Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.propertypages
Class LibQualifiedComboBoxFieldEditor

java.lang.Object
  extended by FieldEditor
      extended by com.ibm.etools.iseries.rse.ui.propertypages.LibQualifiedComboBoxFieldEditor

public class LibQualifiedComboBoxFieldEditor
extends FieldEditor

Uniquely for IBM i, 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
           
 
Constructor Summary
LibQualifiedComboBoxFieldEditor(String name, String labelText, String[] contents, boolean readOnly, Composite parent)
          Constructor for LibQualifiedComboBoxFieldEditor
 
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(ISystemValidator validator)
          Set the library name libValidator.
 void setObjValidator(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright

LIB_CONTENTS

protected static final String[] LIB_CONTENTS
Constructor Detail

LibQualifiedComboBoxFieldEditor

public LibQualifiedComboBoxFieldEditor(String name,
                                       String labelText,
                                       String[] contents,
                                       boolean readOnly,
                                       Composite parent)
Constructor for LibQualifiedComboBoxFieldEditor

Parameters:
name - - the unique ID for this editor. Used as index in preference store. Value stored as "lib/obj"
labelText - - the label text
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(ISystemValidator validator)
Set the library name libValidator. If not set, a default is used.


setObjValidator

public void setObjValidator(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

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

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

doLoad

protected void doLoad()
See Also:
FieldEditor

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

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

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
See Also:
FieldEditor

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


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 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.