Class ModifyDialogTabPage.ButtonPreference
java.lang.Object
java.util.Observable
org.eclipse.m2m.atl.adt.ui.preferences.ModifyDialogTabPage.Preference
org.eclipse.m2m.atl.adt.ui.preferences.ModifyDialogTabPage.ButtonPreference
- Direct Known Subclasses:
ModifyDialogTabPage.CheckboxPreference
,ModifyDialogTabPage.RadioPreference
- Enclosing class:
- ModifyDialogTabPage
Wrapper around a checkbox and a label.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkboxChecked
(boolean state) boolean
org.eclipse.swt.widgets.Control
Returns the main control of a preference, which is mainly used to manage the focus.void
setChecked
(boolean checked) protected void
To be implemented in subclasses.Methods inherited from class org.eclipse.m2m.atl.adt.ui.preferences.ModifyDialogTabPage.Preference
getEnabled, getKey, getPreferences, setEnabled, setKey
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
ButtonPreference
public ButtonPreference(org.eclipse.swt.widgets.Composite composite, int numColumns, Map<String, String> preferences, String key, String[] values, String text, int style) Create a new CheckboxPreference.- Parameters:
composite
- The composite on which the SWT widgets are added.numColumns
- The number of columns in the composite's GridLayout.preferences
- The map to store the values.key
- The key to store the values.values
- An array of two elements indicating the values to store on unchecked/checked.text
- The label text for this Preference.style
- SWT style flag for the button
-
-
Method Details
-
checkboxChecked
protected void checkboxChecked(boolean state) -
updateWidget
protected void updateWidget()Description copied from class:ModifyDialogTabPage.Preference
To be implemented in subclasses. Update the SWT widgets when the state of this object has changed (enabled, key, ...).- Specified by:
updateWidget
in classModifyDialogTabPage.Preference
-
getChecked
public boolean getChecked() -
setChecked
public void setChecked(boolean checked) -
getControl
public org.eclipse.swt.widgets.Control getControl()Description copied from class:ModifyDialogTabPage.Preference
Returns the main control of a preference, which is mainly used to manage the focus. This may benull
if the preference doesn't have a control which is able to have the focus.- Specified by:
getControl
in classModifyDialogTabPage.Preference
- Returns:
- The main control
-