org.eclipse.rse.ui.propertypages
Class SystemKeyValueFieldEditor
java.lang.Object
org.eclipse.jface.preference.FieldEditor
org.eclipse.rse.ui.propertypages.SystemKeyValueFieldEditor
-
public class SystemKeyValueFieldEditor
- extends
FieldEditor
For string key,value pair properties that have a discrete list of key values.
Used in preference pages.
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,
setEnabled,
setFocus,
setLabelText,
setPage,
setPreferenceName,
setPreferencePage,
setPreferenceStore,
setPresentsDefaultValue,
setPropertyChangeListener,
showErrorMessage,
showMessage,
store
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
valueValidator
protected
ISystemValidator valueValidator
defaultValueValidator
protected
ISystemValidator defaultValueValidator
SystemKeyValueFieldEditor
public SystemKeyValueFieldEditor(
String name,
String labelText,
String[] keys,
String keysLabelString,
String valueLabelString,
Composite parent)
- Constructor
setValueValidator
public void setValueValidator(
ISystemValidator v)
- Call this to specify a validator for the value entry field. It will be called per keystroke.
By default we just check against the special characters used to delimit the key and value (=)
and to delimiter each key/value pair (;)
-
setDelimiterCharacters
public void setDelimiterCharacters(char keyValueDelimiter,
char keyValuePairDelimiter)
- Call this to set the characters used to delimit the strings in the preferences store
-
-
Parameters:
-
keyValueDelimiter
- The char to distinguish between key and value. Default is = -
keyValuePairDelimiter
- The char to distinguish between each key/value pair. Default is ;
getNumberOfControls
public int getNumberOfControls()
-
-
Specified by:
-
getNumberOfControls
in class
FieldEditor
-
-
See Also:
-
FieldEditor.getNumberOfControls()
doStore
protected void doStore()
-
-
Specified by:
-
doStore
in class
FieldEditor
-
-
See Also:
-
FieldEditor.doStore()
doLoadDefault
protected void doLoadDefault()
-
-
Specified by:
-
doLoadDefault
in class
FieldEditor
-
-
See Also:
-
FieldEditor.doLoadDefault()
doLoad
protected void doLoad()
-
-
Specified by:
-
doLoad
in class
FieldEditor
-
-
See Also:
-
FieldEditor.doLoad()
parseString
public
Hashtable parseString(
String allvalues)
- Parse out list of key-value pairs into a hashtable
-
createString
protected
String createString(
Hashtable keyValues)
- Convert hashtable of key-value pairs into a single string
-
doFillIntoGrid
protected void doFillIntoGrid(
Composite parent,
int numColumns)
-
-
Specified by:
-
doFillIntoGrid
in class
FieldEditor
-
-
See Also:
-
FieldEditor.doFillIntoGrid(Composite, int)
adjustForNumColumns
protected void adjustForNumColumns(int numColumns)
-
-
Specified by:
-
adjustForNumColumns
in class
FieldEditor
-
-
See Also:
-
FieldEditor.adjustForNumColumns(int)
getKeysControl
protected
List getKeysControl()
- Returns this field editor's List control for the keys.
-
getValueControl
protected
Text getValueControl()
- Returns this field editor's Text control for the key value.
-
getKeysControl
public
Composite getKeysControl(
Composite parent)
- Returns this field editor's text control.
The control is created if it does not yet exist
-
-
Parameters:
-
parent
- the parent
-
Returns:
- the text control
getValueControl
public
Composite getValueControl(
Composite parent)
- Returns this field editor's value entry field control.
-
-
Parameters:
-
parent
- the parent control
-
Returns:
- the list control
createSelectionListener
public void createSelectionListener()
- Creates a selection listener.
-
validateValueInput
protected
SystemMessage validateValueInput()
- This hook method is called whenever the text changes in the input field.
The default implementation delegates the request to an
ISystemValidator
object.
If the ISystemValidator
reports an error the error message is displayed
in the PreferencePage's message line.
-
-
See Also:
-
setValueValidator(ISystemValidator)
setHeightHint
public void setHeightHint(int hint)
- Change the height hint for this composite.
Default is 100 pixels.
-
setKeysWidthHint
public void setKeysWidthHint(int hint)
- Change the width hint for the keys list
Default is 150 pixels.
-
setValuesWidthHint
public void setValuesWidthHint(int hint)
- Change the width hint for the values fields on the right
Default is not set
-
setToolTipText
public void setToolTipText(
String tip)
- Set the tooltip text
-
getToolTipText
public
String getToolTipText()
- Get the tooltip text
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.