public class SelectionButtonField extends BasicField
Selection Button Dialog Field
Dialog Field containing a single button such as a radio or checkbox button.
fLabelControl, fLabelText, fUseFormLayout, fWidgetFactory, MAX_WITDH| Constructor and Description |
|---|
SelectionButtonField(int buttonStyle)
Creates a selection button.
|
SelectionButtonField(IWidgetFactory widgetFactory,
int buttonStyle) |
| Modifier and Type | Method and Description | |||
|---|---|---|---|---|
void |
attachDialogField(BasicField basicField)
Attaches a field to the selection state of the selection button.
|
|||
void |
attachDialogFields(BasicField[] dialogFields)
Attaches fields to the selection state of the selection button.
|
|||
void |
dispose()
Disposes of the operating system resources associated with the field.
|
|||
protected org.eclipse.swt.widgets.Control[] |
doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
/!\
| To be re-implemented by platform field implementors.
| /!\
|
|
org.eclipse.swt.widgets.Control |
getButtonControl() |
|||
protected int |
getNumberOfControls()
Returns the number of columns of the dialog field.
|
|||
org.eclipse.swt.widgets.Button |
getSelectionButton(org.eclipse.swt.widgets.Composite group)
Returns the selection button widget.
|
|||
boolean |
isAttached(BasicField editor)
Returns
true is the given field is attached to the selection button. |
|||
boolean |
isSelected()
Returns the selection state of the button.
|
|||
void |
refresh()
Brings the UI in sync with the model.
|
|||
void |
setLabelText(java.lang.String labeltext)
Sets the label of the dialog field.
|
|||
void |
setSelection(boolean selected)
Sets the selection state of the button.
|
|||
void |
setSelectionWithoutEvent(boolean selected)
Set button selection without triggering "dialog field changed" event.
|
|||
void |
setToolTipText(java.lang.String toolTip)
Sets the tool tip of the dialog field.
|
|||
protected void |
updateEnableState()
Called when the enable state changed.
|
addFieldListener, assertCompositeNotNull, createEmptySpace, createEmptySpace, createLabelControl, createSpecificComposite, dialogFieldChanged, fillIntoGrid, getLabelControl, getLabelControl, getLabelControl, isEnabled, isOkToUse, removeFieldListener, setEnabled, setFocuspublic SelectionButtonField(int buttonStyle)
buttonStyle - Style to be applied to the button.public SelectionButtonField(IWidgetFactory widgetFactory, int buttonStyle)
public void attachDialogField(BasicField basicField)
public void attachDialogFields(BasicField[] dialogFields)
public boolean isAttached(BasicField editor)
true is the given field is attached to the selection button.protected org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
BasicField
| /!\ | To be re-implemented by platform field implementors. | /!\ |
doFillIntoGrid in class BasicFieldparent - The parent composite of this dialog field.nColumns - The number of columns of this dialog field.protected int getNumberOfControls()
BasicFieldgetNumberOfControls in class BasicFieldpublic org.eclipse.swt.widgets.Button getSelectionButton(org.eclipse.swt.widgets.Composite group)
group - The parent composite when called the first time, or null after.public org.eclipse.swt.widgets.Control getButtonControl()
public void setLabelText(java.lang.String labeltext)
IFieldsetLabelText in interface IFieldsetLabelText in class BasicFieldlabeltext - The text of the label.public void setToolTipText(java.lang.String toolTip)
IFieldsetToolTipText in interface IFieldsetToolTipText in class BasicFieldtoolTip - The text to use as tool tip.public boolean isSelected()
public void setSelection(boolean selected)
public void setSelectionWithoutEvent(boolean selected)
selected - The expected selection state of the button.protected void updateEnableState()
BasicFieldupdateEnableState in class BasicFieldpublic void dispose()
IFielddispose in interface IFielddispose in class BasicFieldpublic void refresh()
BasicFieldrefresh in class BasicField