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, setFocus
public 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 BasicField
parent
- The parent composite of this dialog field.nColumns
- The number of columns of this dialog field.protected int getNumberOfControls()
BasicField
getNumberOfControls
in class BasicField
public 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)
IField
setLabelText
in interface IField
setLabelText
in class BasicField
labeltext
- The text of the label.public void setToolTipText(java.lang.String toolTip)
IField
setToolTipText
in interface IField
setToolTipText
in class BasicField
toolTip
- 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()
BasicField
updateEnableState
in class BasicField
public void dispose()
IField
dispose
in interface IField
dispose
in class BasicField
public void refresh()
BasicField
refresh
in class BasicField