iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.ui.propertypages
Class ISeriesLibQualifiedComboBoxFieldEditor

java.lang.Object
  extended byorg.eclipse.jface.preference.FieldEditor
      extended bycom.ibm.etools.iseries.core.ui.propertypages.ISeriesLibQualifiedComboBoxFieldEditor

public class ISeriesLibQualifiedComboBoxFieldEditor
extends FieldEditor

Uniquely for iSeries, a preference field editor that allows a library qualified prompt as in:


     Library: _________V
     Object:  _________V
 


Field Summary
static String copyright
           
protected static String[] LIB_CONTENTS
           
 
Fields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
ISeriesLibQualifiedComboBoxFieldEditor(String name, ResourceBundle rb, String libLabelKey, String objLabelKey, String[] contents, boolean readOnly, Composite parent)
          Constructor for ISeriesLibQualifiedComboBoxFieldEditor
 
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)
          Called by parent's constructor, which is too soon for us! So, we do nothing here and then do the real work later by calling ourDoFillIntoGrid(...).
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doStore()
          Set the qualified name from the two combo boxes into the preference store.
protected  Combo getLibCombo()
          Returns this field editor's library Combo control.
 int getNumberOfControls()
           
protected  Combo getObjCombo()
          Returns this field editor's object Combo control.
protected  String getQualifiedName()
          Return the qualified name from the two combo boxes.
 Combo getTextControl(Composite parent)
          Returns this field editor's text control.
protected  boolean isReadOnly()
          Is this a readonly combo?
protected  boolean isUnqualifiedName(String name)
          Check if a given object name is a special name that means the library should be disabled..
 boolean isValid()
          Override of parent to return validity state.
protected  void ourDoFillIntoGrid()
          Called by parent's constructor, which is too soon for us! So, we do nothing here and then do the real work later by calling ourDoFillIntoGrid(...).
protected  void refreshValidState()
          Override of parent to refresh validity state by checking if the input is valid.
protected  void selectionChanged(boolean libChanged)
          Combobox selection changed
 void setFocus()
          Set focus
 void setLibValidator(com.ibm.etools.systems.core.ui.validators.ISystemValidator validator)
          Set the library name libValidator.
 void setObjValidator(com.ibm.etools.systems.core.ui.validators.ISystemValidator validator)
          Set the object name libValidator.
 void setUnqualifiedObjectNames(String[] unqualifiedNames)
          Set special values for the object name, such that when these are selected, the library prompt is to be disabled and set to "*libl".
protected  String toUpperCase(String name)
          Uppercase name if not a quoted name
protected  void validateLibrary()
          Validate library combo contents
protected  void validateObject()
          Validator object combo contents
protected  void valueChanged(boolean libChanged)
          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, getPreferenceName, getPreferencePage, getPreferenceStore, init, load, loadDefault, presentsDefaultValue, setButtonLayoutData, setEnabled, setLabelText, 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
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

LIB_CONTENTS

protected static final String[] LIB_CONTENTS
Constructor Detail

ISeriesLibQualifiedComboBoxFieldEditor

public ISeriesLibQualifiedComboBoxFieldEditor(String name,
                                              ResourceBundle rb,
                                              String libLabelKey,
                                              String objLabelKey,
                                              String[] contents,
                                              boolean readOnly,
                                              Composite parent)
Constructor for ISeriesLibQualifiedComboBoxFieldEditor

Parameters:
name - - the unique ID for this editor. Used as index in preference store. Value stored as "lib/obj"
rb - - the resource bundle to use to get the strings from
libLabelKey - - the library label+tooltip rb key. Will append "label" and "tooltip" to it
objLabelKey - - the object label+tooltip rb key. Will append "label" and "tooltip" to it
contents - - the list of strings to show in the object dropdown, as an array. The library contents are hardcoded.
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

setLibValidator

public void setLibValidator(com.ibm.etools.systems.core.ui.validators.ISystemValidator validator)
Set the library name libValidator. If not set, a default is used.


setObjValidator

public void setObjValidator(com.ibm.etools.systems.core.ui.validators.ISystemValidator validator)
Set the object name libValidator. If not set, a default is used.


setUnqualifiedObjectNames

public void setUnqualifiedObjectNames(String[] unqualifiedNames)
Set special values for the object name, such that when these are selected, the library prompt is to be disabled and set to "*libl". EG, "*USRPRF" for job description prompts


getNumberOfControls

public int getNumberOfControls()
See Also:
FieldEditor.getNumberOfControls()

doStore

protected void doStore()
Set the qualified name from the two combo boxes into the preference store. Takes care of uppercasing and trimming.

See Also:
FieldEditor.doStore()

getQualifiedName

protected String getQualifiedName()
Return the qualified name from the two combo boxes. Takes care of uppercasing and trimming.


toUpperCase

protected String toUpperCase(String name)
Uppercase name if not a quoted name


doLoadDefault

protected void doLoadDefault()
See Also:
FieldEditor.doLoadDefault()

doLoad

protected void doLoad()
See Also:
FieldEditor.doLoad()

doFillIntoGrid

protected void doFillIntoGrid(Composite parent,
                              int numColumns)
Called by parent's constructor, which is too soon for us! So, we do nothing here and then do the real work later by calling ourDoFillIntoGrid(...).

See Also:
FieldEditor.doFillIntoGrid(Composite, int)

ourDoFillIntoGrid

protected void ourDoFillIntoGrid()
Called by parent's constructor, which is too soon for us! So, we do nothing here and then do the real work later by calling ourDoFillIntoGrid(...).

See Also:
FieldEditor.doFillIntoGrid(Composite, int)

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
See Also:
FieldEditor.adjustForNumColumns(int)

getLibCombo

protected Combo getLibCombo()
Returns this field editor's library Combo control.


getObjCombo

protected Combo getObjCombo()
Returns this field editor's object 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

isReadOnly

protected boolean isReadOnly()
Is this a readonly combo?


createSelectionListener

protected void createSelectionListener()
Creates a selection listener.


selectionChanged

protected void selectionChanged(boolean libChanged)
Combobox selection changed


createModifyListener

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


validateLibrary

protected void validateLibrary()
Validate library combo contents


validateObject

protected void validateObject()
Validator object combo contents


valueChanged

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


isUnqualifiedName

protected boolean isUnqualifiedName(String name)
Check if a given object name is a special name that means the library should be disabled..


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


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.


setFocus

public void setFocus()
Set focus


iSeries Remote Systems
v6.0.0

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.