Class BooleanRow
- java.lang.Object
-
- org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
-
- org.libreoffice.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 toLabeledRow.
-
-
Field Summary
-
Fields inherited from class org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
LAYOUT_COLUMNS, mBrowse, mField, mLabel, mListener, mProperty
-
-
Constructor Summary
Constructors Constructor Description BooleanRow(org.eclipse.swt.widgets.Composite pParent, java.lang.String pProperty, java.lang.String pLabel)Creates a new boolean raw.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBooleanValue()java.lang.StringgetValue()Get or calculate the value of this property.voidsetEnabled(boolean pEnabled)Set the enabled state of the field and the browse button if the latter exists.voidsetLabel(java.lang.String pNewLabel)Replace the current label by a new one.voidsetTooltip(java.lang.String pTooltip)Set the tooltip message of the row.voidsetValue(boolean pValue)Set a new value to the raw.voidtoggleValue()Changes the value of the raw.-
Methods inherited from class org.libreoffice.ide.eclipse.core.gui.rows.LabeledRow
addBrowseSelectionListener, createContent, fillRow, fireFieldChangedEvent, getLabel, getProperty, removeFieldChangedlistener, setFieldChangedListener, setVisible
-
-
-
-
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:
setLabelin classLabeledRow- Parameters:
pNewLabel- New label to use
-
setTooltip
public void setTooltip(java.lang.String pTooltip)
Set the tooltip message of the row.- Overrides:
setTooltipin classLabeledRow- 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:
getValuein classLabeledRow- 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:
setEnabledin classLabeledRow- Parameters:
pEnabled-trueactivate the row, otherwise the row is desactivated
-
-