org.eclipse.actf.ui.preferences
Class ScaleFieldEditorWithValue

java.lang.Object
  extended by org.eclipse.jface.preference.FieldEditor
      extended by org.eclipse.jface.preference.ScaleFieldEditor
          extended by org.eclipse.actf.ui.preferences.ScaleFieldEditorWithValue

public class ScaleFieldEditorWithValue
extends org.eclipse.jface.preference.ScaleFieldEditor

A field editor for an integer type preference. It obtain current Scale value from IScaleValueLabelProvider and show the value as a Label.

See Also:
ScaleFieldEditor

Field Summary
 
Fields inherited from class org.eclipse.jface.preference.FieldEditor
IS_VALID, VALUE
 
Constructor Summary
ScaleFieldEditorWithValue(String name, String labelText, org.eclipse.swt.widgets.Composite parent)
          Create a new scale field editor with min/max/current value Labels.
ScaleFieldEditorWithValue(String name, String labelText, org.eclipse.swt.widgets.Composite parent, int min, int max, int increment, int pageIncrement)
          Create a new scale field editor with min/max/current value Labels.
 
Method Summary
 int getNumberOfControls()
           
 void setScaleValueLabelProvider(IScaleValueLabelProvider scaleValueLabelProvider)
          Set new IScaleValueLabelProvider to be used to obtain current Scale value.
 
Methods inherited from class org.eclipse.jface.preference.ScaleFieldEditor
getIncrement, getMaximum, getMinimum, getPageIncrement, getScaleControl, setFocus, setIncrement, setMaximum, setMinimum, setPageIncrement
 
Methods inherited from class org.eclipse.jface.preference.FieldEditor
dispose, fillIntoGrid, getFieldEditorFontName, getLabelControl, getLabelText, getPreferenceName, getPreferenceStore, isValid, load, loadDefault, presentsDefaultValue, setEnabled, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPropertyChangeListener, store
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleFieldEditorWithValue

public ScaleFieldEditorWithValue(String name,
                                 String labelText,
                                 org.eclipse.swt.widgets.Composite parent)
Create a new scale field editor with min/max/current value Labels. The current Scale value is converted to String by using IScaleValueLabelProvider. Default IScaleValueLabelProvider will convert current value by using Integer.toString().

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
parent - the parent of the field editor's control

ScaleFieldEditorWithValue

public ScaleFieldEditorWithValue(String name,
                                 String labelText,
                                 org.eclipse.swt.widgets.Composite parent,
                                 int min,
                                 int max,
                                 int increment,
                                 int pageIncrement)
Create a new scale field editor with min/max/current value Labels. The current Scale value is converted to String by using IScaleValueLabelProvider. Default IScaleValueLabelProvider will convert current value by using Integer.toString().

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
parent - the parent of the field editor's control
min - the value used for Scale.setMinimum(int).
max - the value used for Scale.setMaximum(int).
increment - the value used for Scale.setIncrement(int).
pageIncrement - the value used for Scale.setPageIncrement(int).
Method Detail

getNumberOfControls

public int getNumberOfControls()
Overrides:
getNumberOfControls in class org.eclipse.jface.preference.ScaleFieldEditor

setScaleValueLabelProvider

public void setScaleValueLabelProvider(IScaleValueLabelProvider scaleValueLabelProvider)
Set new IScaleValueLabelProvider to be used to obtain current Scale value.

Parameters:
scaleValueLabelProvider - target IScaleValueLabelProvider