org.openoffice.ide.eclipse.core.gui.rows
Class BooleanRow

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
      extended by org.openoffice.ide.eclipse.core.gui.rows.BooleanRow

public class BooleanRow
extends LabeledRow

Usefull class to create a boolean choice row with a label. For further informations on rows, please report to LabeledRow.

Author:
cedricbosdo

Field Summary
 
Fields inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
LAYOUT_COLUMNS, mBrowse, mField, mLabel, mListener, mProperty
 
Constructor Summary
BooleanRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel)
          Creates a new boolean raw.
 
Method Summary
 boolean getBooleanValue()
           
 java.lang.String getValue()
          Get or calculate the value of this property.
 void setEnabled(boolean pEnabled)
          Set the enabled state of the field and the browse button if the latter exists.
 void setLabel(java.lang.String pNewLabel)
          Replace the current label by a new one.
 void setTooltip(java.lang.String pTooltip)
          Set the tooltip message of the row.
 void setValue(boolean pValue)
          Set a new value to the raw.
 void toggleValue()
          Changes the value of the raw.
 
Methods inherited from class org.openoffice.ide.eclipse.core.gui.rows.LabeledRow
createContent, fillRow, fireFieldChangedEvent, getLabel, getProperty, removeFieldChangedlistener, setFieldChangedListener, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanRow

public BooleanRow(org.eclipse.swt.widgets.Composite pParent,
                  java.lang.String pProperty,
                  java.lang.String pLabel)
Creates a new boolean raw. The parent composite should have a grid layout with 2 or 3 horizontal spans.

Parameters:
pParent - the parent composite where to create the row.
pProperty - the property name of the row.
pLabel - the label to print on the left of the raw
Method Detail

setLabel

public void setLabel(java.lang.String pNewLabel)
Replace the current label by a new one.

Overrides:
setLabel in class LabeledRow
Parameters:
pNewLabel - New label to use

setTooltip

public void setTooltip(java.lang.String pTooltip)
Set the tooltip message of the row.

Overrides:
setTooltip in class LabeledRow
Parameters:
pTooltip - the tooltip message

setValue

public void setValue(boolean pValue)
Set a new value to the raw.

Parameters:
pValue - the new value

toggleValue

public void toggleValue()
Changes the value of the raw.


getBooleanValue

public boolean getBooleanValue()
Returns:
the value of the raw as a boolean.

getValue

public java.lang.String getValue()
Get or calculate the value of this property.

Specified by:
getValue in class LabeledRow
Returns:
the property value

setEnabled

public void setEnabled(boolean pEnabled)
Set the enabled state of the field and the browse button if the latter exists.

Overrides:
setEnabled in class LabeledRow
Parameters:
pEnabled - true activate the row, otherwise the row is desactivated