com.aptana.ide.core.ui.dialogs
Class FieldSpacer

java.lang.Object
  extended by org.eclipse.jface.preference.FieldEditor
      extended by com.aptana.ide.core.ui.dialogs.FieldSpacer

public class FieldSpacer
extends org.eclipse.jface.preference.FieldEditor

A field editor for a boolean type preference.


Field Summary
static int DEFAULT
          Style constant (value 0) indicating the default layout where the field editor's check box appears to the left of the label.
static int SEPARATE_LABEL
          Style constant (value 1) indicating a layout where the field editor's label appears on the left with a check box on the right.
 
Fields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
FieldSpacer()
          Creates a new boolean field editor
FieldSpacer(java.lang.String label, org.eclipse.swt.widgets.Composite parent)
          Creates a boolean field editor in the default style.
FieldSpacer(java.lang.String labelText, int style, org.eclipse.swt.widgets.Composite parent)
          Creates a boolean field editor in the given style.
 
Method Summary
protected  void adjustForNumColumns(int numColumns)
           
protected  void doFillIntoGrid(org.eclipse.swt.widgets.Composite parent, int numColumns)
           
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doStore()
           
protected  org.eclipse.swt.widgets.Button getChangeControl(org.eclipse.swt.widgets.Composite parent)
          Returns the change button for this field editor.
 int getNumberOfControls()
           
 void setEnabled(boolean enabled, org.eclipse.swt.widgets.Composite parent)
           
 void setLabelText(java.lang.String text)
           
 void store()
           
protected  void valueChanged(boolean oldValue, boolean newValue)
          Informs this field editor's listener, if it has one, about a change to the value (VALUE property) provided that the old and new values are different.
 
Methods inherited from class org.eclipse.jface.preference.FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, isValid, load, loadDefault, presentsDefaultValue, refreshValidState, setButtonLayoutData, setFocus, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final int DEFAULT
Style constant (value 0) indicating the default layout where the field editor's check box appears to the left of the label.

See Also:
Constant Field Values

SEPARATE_LABEL

public static final int SEPARATE_LABEL
Style constant (value 1) indicating a layout where the field editor's label appears on the left with a check box on the right.

See Also:
Constant Field Values
Constructor Detail

FieldSpacer

public FieldSpacer()
Creates a new boolean field editor


FieldSpacer

public FieldSpacer(java.lang.String labelText,
                   int style,
                   org.eclipse.swt.widgets.Composite parent)
Creates a boolean field editor in the given style.

Parameters:
labelText - the label text of the field editor
style - the style, either DEFAULT or SEPARATE_LABEL
parent - the parent of the field editor's control
See Also:
DEFAULT, SEPARATE_LABEL

FieldSpacer

public FieldSpacer(java.lang.String label,
                   org.eclipse.swt.widgets.Composite parent)
Creates a boolean field editor in the default style.

Parameters:
label - the label text of the field editor
parent - the parent of the field editor's control
Method Detail

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
Specified by:
adjustForNumColumns in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.adjustForNumColumns(int)

doFillIntoGrid

protected void doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
                              int numColumns)
Specified by:
doFillIntoGrid in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)

doLoad

protected void doLoad()
Specified by:
doLoad in class org.eclipse.jface.preference.FieldEditor
See Also:
Loads the value from the preference store and sets it to the check box

getChangeControl

protected org.eclipse.swt.widgets.Button getChangeControl(org.eclipse.swt.widgets.Composite parent)
Returns the change button for this field editor.

Parameters:
parent - The Composite to create the receiver in.
Returns:
the change button

getNumberOfControls

public int getNumberOfControls()
Specified by:
getNumberOfControls in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.getNumberOfControls()

setLabelText

public void setLabelText(java.lang.String text)
Overrides:
setLabelText in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.setLabelText(java.lang.String)

valueChanged

protected void valueChanged(boolean oldValue,
                            boolean newValue)
Informs this field editor's listener, if it has one, about a change to the value (VALUE property) provided that the old and new values are different.

Parameters:
oldValue - the old value
newValue - the new value

setEnabled

public void setEnabled(boolean enabled,
                       org.eclipse.swt.widgets.Composite parent)
Overrides:
setEnabled in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.setEnabled(boolean, org.eclipse.swt.widgets.Composite)

doLoadDefault

protected void doLoadDefault()
Specified by:
doLoadDefault in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doLoadDefault()

doStore

protected void doStore()
Specified by:
doStore in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doStore()

store

public void store()
Overrides:
store in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.store()