com.aptana.ide.ui.editors.preferences.formatter
Class ModifyDialogTabPage.ComboPreference

java.lang.Object
  extended by java.util.Observable
      extended by com.aptana.ide.ui.editors.preferences.formatter.ModifyDialogTabPage.Preference
          extended by com.aptana.ide.ui.editors.preferences.formatter.ModifyDialogTabPage.ComboPreference
Enclosing class:
ModifyDialogTabPage

public final class ModifyDialogTabPage.ComboPreference
extends ModifyDialogTabPage.Preference

Wrapper around a Combo box.


Constructor Summary
ModifyDialogTabPage.ComboPreference(org.eclipse.swt.widgets.Composite composite, int numColumns, java.util.Map preferences, java.lang.String key, java.lang.String[] values, java.lang.String text, java.lang.String[] items)
          Create a new ComboPreference.
 
Method Summary
protected  void comboSelected(int index)
           
 org.eclipse.swt.widgets.Control getControl()
          Returns the main control of a preference, which is mainly used to manage the focus.
 java.lang.String getSelectedItem()
           
 boolean hasValue(java.lang.String value)
           
protected  void updateWidget()
          To be implemented in subclasses.
 
Methods inherited from class com.aptana.ide.ui.editors.preferences.formatter.ModifyDialogTabPage.Preference
getEnabled, getKey, getPreferences, setEnabled, setKey
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyDialogTabPage.ComboPreference

public ModifyDialogTabPage.ComboPreference(org.eclipse.swt.widgets.Composite composite,
                                           int numColumns,
                                           java.util.Map preferences,
                                           java.lang.String key,
                                           java.lang.String[] values,
                                           java.lang.String text,
                                           java.lang.String[] items)
Create a new ComboPreference.

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 n elements indicating the values to store for each selection.
text - The label text for this Preference.
items - An array of n elements indicating the text to be written in the combo box.
Method Detail

comboSelected

protected void comboSelected(int index)
Parameters:
index -

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 class ModifyDialogTabPage.Preference
See Also:
ModifyDialogTabPage.Preference.updateWidget()

getSelectedItem

public java.lang.String getSelectedItem()
Returns:
selected item

hasValue

public boolean hasValue(java.lang.String value)
Parameters:
value -
Returns:
has it

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 be null if the preference doesn't have a control which is able to have the focus.

Specified by:
getControl in class ModifyDialogTabPage.Preference
Returns:
The main control
See Also:
ModifyDialogTabPage.Preference.getControl()