Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.propertypages
Class SystemComboBoxFieldEditor

java.lang.Object
  extended by 

org.eclipse.jface.preference.FieldEditor
      extended by 
org.eclipse.rse.ui.propertypages.SystemComboBoxFieldEditor

public class SystemComboBoxFieldEditor
extends FieldEditor

For string properties that have a discrete list of possibilities.


Field Summary
 
Fields inherited from class org.eclipse.jface.preference. FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
SystemComboBoxFieldEditor ( String name, ResourceBundle rb, String rbKey, String[] contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using an array for the contents, and specifying a resource bundle and key, from which we will retrieve the label and the tooltip text
SystemComboBoxFieldEditor ( String name, String labelText, String[] contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using an array for the contents
SystemComboBoxFieldEditor ( String name, String labelText, Vector contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using a Vector for the contents
 
Method Summary
protected  void adjustForNumColumns (int numColumns)
           
protected  void createModifyListener ()
          Creates a modify text listener.
protected  void createSelectionListener ()
          Creates a selection listener.
protected  void doFillIntoGrid ( Composite parent, int numColumns)
          This is called by our parent's constructor, which is too soon for us!
protected  void doLoad ()
           
protected  void doLoadDefault ()
           
protected  void doOurFillIntoGrid ()
          Create controls
protected  void doStore ()
           
 int getNumberOfControls ()
           
  Combo getTextControl ()
          Returns this field editor's Combo control.
  Combo getTextControl ( Composite parent)
          Returns this field editor's text control.
protected  boolean isReadOnly ()
          Is this a readonly combo?
 boolean isValid ()
          Override of parent to return validity state.
protected  void refreshValidState ()
          Override of parent to refresh validity state by checking if the input is valid.
protected  void selectionChanged ()
          Combobox selection changed
 void setFocus ()
          Set focus
 void setMassager ( ISystemMassager massager)
          Set the massager that is used to affect the user-entered text before saving it to the preference store
 void setToolTipText ( String tip)
          Allows setting of tooltip text
 void setValidator ( ISystemValidator validator)
          If this combobox is editable, set the validator to use here per keystroke
protected  void validate ()
          Validate contents of combo field
protected  void valueChanged ()
          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, load, loadDefault, presentsDefaultValue, setButtonLayoutData, setEnabled, 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
 

Constructor Detail

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(
String name,
                                 
String labelText,
                                 
Vector contents,
                                 boolean readOnly,
                                 
Composite parent)
Constructor for SystemComboBoxFieldEditor, using a Vector for the contents

Parameters:
name - - the unique ID for this editor. Used as index in preference store
labelText - - the label to show as the prompt preceding the dropdown
contents - - the list of strings to show in the dropdown, as a vector
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(
String name,
                                 
String labelText,
                                 
String[] contents,
                                 boolean readOnly,
                                 
Composite parent)
Constructor for SystemComboBoxFieldEditor, using an array for the contents

Parameters:
name - - the unique ID for this editor. Used as index in preference store
labelText - - the label to show as the prompt preceding the dropdown
contents - - the list of strings to show in the dropdown, as an array
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(
String name,
                                 
ResourceBundle rb,
                                 
String rbKey,
                                 
String[] contents,
                                 boolean readOnly,
                                 
Composite parent)
Constructor for SystemComboBoxFieldEditor, using an array for the contents, and specifying a resource bundle and key, from which we will retrieve the label and the tooltip text

Parameters:
name - - the unique ID for this editor. Used as index in preference store
rb - - the resource bundle from which to retrieve the mri
rbKey - - the key into the resource bundle, to get the label (+"label") and tooltip text (+"tooltip")
contents - - the list of strings to show in the dropdown, as an array
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor
Method Detail

setValidator

public void setValidator(
ISystemValidator validator)
If this combobox is editable, set the validator to use here per keystroke


setMassager

public void setMassager(
ISystemMassager massager)
Set the massager that is used to affect the user-entered text before saving it to the preference store


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()

doFillIntoGrid

protected void doFillIntoGrid(
Composite parent,
                              int numColumns)
This is called by our parent's constructor, which is too soon for us! So, we do nothing here and then call doOurFillIntoGrid later within our own constructor.

Specified by:
doFillIntoGrid in class FieldEditor
See Also:
FieldEditor.doFillIntoGrid(Composite, int)

doOurFillIntoGrid

protected void doOurFillIntoGrid()
Create controls


adjustForNumColumns

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

getTextControl

public 
Combo getTextControl()
Returns this field editor's Combo control.


getTextControl

public 
Combo getTextControl(
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

setToolTipText

public void setToolTipText(
String tip)
Allows setting of tooltip text


isReadOnly

protected boolean isReadOnly()
Is this a readonly combo?


createSelectionListener

protected void createSelectionListener()
Creates a selection listener.


selectionChanged

protected void selectionChanged()
Combobox selection changed


createModifyListener

protected void createModifyListener()
Creates a modify text listener. Ony used for non-readonly flavours


validate

protected void validate()
Validate contents of combo field


valueChanged

protected void valueChanged()
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.

This hook is not called when the text is initialized (or reset to the default value) from the preference store.


isValid

public boolean isValid()
Override of parent to return validity state. If this readonly, we always return true, else we return result of last validation

Overrides:
isValid in class FieldEditor

refreshValidState

protected void refreshValidState()
Override of parent to refresh validity state by checking if the input is valid. Does nothing unless this is not a readonly combo.

Overrides:
refreshValidState in class FieldEditor

setFocus

public void setFocus()
Set focus

Overrides:
setFocus in class FieldEditor

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire