|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Composite com.ibm.etools.iseries.rse.ui.widgets.QSYSBasePrompt com.ibm.etools.iseries.rse.ui.widgets.QSYSProgramObjectPrompt com.ibm.etools.iseries.rse.ui.widgets.QSYSModulePrompt
public class QSYSModulePrompt
This re-usable composite widget is for prompting the user for a module name. The module name widget is a combo that lists special values and previously entered (historical) names. Beside the combo is a button with a Browse label for selecting an object from a remote list. Of course modules are qualified by library and pgm/srvpgm names so this also prompts for those.
The composite is layed as follows:
Library: ______________________v Browse...
Program: ______________________v Browse...
Module : ______________________v Browse...
You must specify whether this prompt is for a generic module name like ABC* or a scalar module name like ABC1. Beyond appropriate error checking it also affects the special-values contents of the dropdowns.
Furthermore, to help scope the history of the dropdown you must specify whether you are prompting for modules inside programs, or service programs, or both, via constants in IISeriesProgramPromptTypes.
,
setModuleChangeListener(IQSYSModulePromptListener)
Field Summary | |
---|---|
protected IQSYSSelectObjectAction |
browseModuleAction
|
protected Button |
browseModuleButton
|
static String |
copyright
|
protected ISeriesObjectFilterString |
moduleFilterString
|
protected ValidatorIBMiObject |
moduleValidator
|
protected SystemHistoryCombo |
promptModuleCombo
|
protected Label |
promptModuleLabel
|
Fields inherited from class com.ibm.etools.iseries.rse.ui.widgets.QSYSProgramObjectPrompt |
---|
allowEmpty, allowGeneric, allowLibl, browseProgramButton, browseServiceProgramButton, CURLIB, filterString, LIBL, libValidator, listener, objTypes, PGM, pgmValidator, programRadioButton, promptProgramCombo, promptProgramLabel, promptServiceProgramCombo, promptServiceProgramLabel, serviceProgramRadioButton, SRVPGM |
Fields inherited from class com.ibm.etools.iseries.rse.ui.widgets.QSYSBasePrompt |
---|
browseAction, browseButton, defaultConnection, enableBrowse, gridColumns, ignoreChanges, onlyConnection, promptCombo, promptLabel, rb, showNewConnection, testing |
Fields inherited from interface com.ibm.etools.iseries.rse.ui.widgets.IIBMiProgramPromptTypes |
---|
PGMTYPE_PGM, PGMTYPE_PGM_OR_SRVPGM, PGMTYPE_SRVPGM |
Constructor Summary | |
---|---|
QSYSModulePrompt(Composite parent,
int pgmType)
Constructor when generic names are allowed and no special style is desired for the composite |
|
QSYSModulePrompt(Composite parent,
int style,
boolean allowGeneric,
boolean allowLibl,
int pgmType)
Constructor |
|
QSYSModulePrompt(Composite parent,
int style,
int pgmType)
Constructor when generic names are allowed |
Method Summary | |
---|---|
void |
addBrowseButtonSelectionListener(SelectionListener listener)
Register a listener interested in when the either the library or object or module browse button is selected |
protected void |
addModuleButtonSelectionListener()
Enables our browse button for modules. |
void |
addModuleModifyListener(ModifyListener listener)
Register a listener interested in module entry field modify events |
void |
addSelectionListener(SelectionListener listener)
Register a listener interested in an item is selected in either the library combo box or the object combo box or the module object combo box |
protected IQSYSSelectObjectAction |
getModuleBrowseAction(Shell shell,
IHost defaultConnection,
boolean onlyConnection)
Overridable method. |
Button |
getModuleBrowseButton()
Return the module Browse... |
SystemHistoryCombo |
getModuleCombo()
Return the combo box widget for the module prompt |
protected ISeriesObjectFilterString |
getModuleFilterString()
Get the module filter string to use in building the quick filter string. |
String[] |
getModuleItems()
Get the items in the module combo field |
String |
getModuleName()
Get the user entered or selected module name. |
protected void |
populateModuleCombo(SystemHistoryCombo combo,
boolean allowGeneric)
Populates our module combo. |
void |
removeBrowseButtonSelectionListener(SelectionListener listener)
Remove a previously set browse button selection listener. |
void |
removeModuleModifyListener(ModifyListener listener)
Remove a previously set module entry field listener. |
void |
removeSelectionListener(SelectionListener listener)
Remove a previously set combo box selection listener. |
void |
setEnabled(boolean enabled)
Disable/Enable all the child controls. |
void |
setModuleBrowseButtonFocus()
Set the focus to the module browse button |
void |
setModuleBrowseButtonToolTipText(String tip)
Set the tooltip text for the module browse button |
void |
setModuleChangeListener(IQSYSModulePromptListener listener)
Identify caller that is interested in being informed of live error checking status. |
boolean |
setModuleFocus()
Set the focus to the module combo field |
void |
setModuleItems(String[] items)
Set the items in the module combo field |
void |
setModuleName(String name)
Set the module name displayed in the combo box. |
void |
setModulePromptLabel(String label)
Set the module prompt label |
void |
setModuleToolTipText(String tip)
Set the tooltip text for the module combo field |
void |
setModuleValidator(ValidatorIBMiObject objValidator)
Set the module validator for syntax checking There is one supplied for you so you rarely need to call this. |
void |
setSystemConnection(IHost onlyConnection)
Set the system connection to use when Browse is pressed. Unlike setDefaultConnection, this has the result of not allowing the user to select or create any other connection. |
void |
updateHistory()
Update the history with current entry field setting. |
SystemMessage |
validateLibInput()
Validate library string, as it is typed, or in batch if you wish to call directly. |
SystemMessage |
validateModuleInput()
Validate module name string, as it is typed, or in batch if you wish to call directly. |
SystemMessage |
validateObjInput()
Validate object string, as it is typed, or in batch if you wish to call directly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String copyright
protected Label promptModuleLabel
protected SystemHistoryCombo promptModuleCombo
protected Button browseModuleButton
protected ISeriesObjectFilterString moduleFilterString
protected ValidatorIBMiObject moduleValidator
protected IQSYSSelectObjectAction browseModuleAction
Constructor Detail |
---|
public QSYSModulePrompt(Composite parent, int pgmType)
parent
- Parent compositepgmType
- Pass one of the type constants in com.ibm.etools.iseries.core.ui.widgets.IISeriesProgramPromptTypes
such as PGMTYPE_PGM#setDefaultConnection(SystemConnection)
public QSYSModulePrompt(Composite parent, int style, int pgmType)
parent
- Parent compositestyle
- The SWT style flags for overall composite widget. Typically just pass SWT.NULLpgmType
- Pass one of the type constants in com.ibm.etools.iseries.core.ui.widgets.IISeriesProgramPromptTypes
such as PGMTYPE_PGM#setDefaultConnection(SystemConnection)
public QSYSModulePrompt(Composite parent, int style, boolean allowGeneric, boolean allowLibl, int pgmType)
parent
- Parent compositestyle
- The SWT style flags for overall composite widget. Typically just pass SWT.NULLdefaultConnection
- The system connection to preselect when Browse is pressed.allowGeneric
- Pass true to allow generic names in the entry fieldallowLibl
- Pass false if allowGeneric is false, to restrict user from entering/selecting "*LIBL" for the librarypgmType
- Pass one of the type constants in com.ibm.etools.iseries.core.ui.widgets.IISeriesProgramPromptTypes
such as PGMTYPE_PGM#setDefaultConnection(SystemConnection)
Method Detail |
---|
public void setModuleChangeListener(IQSYSModulePromptListener listener)
public SystemHistoryCombo getModuleCombo()
public String getModuleName()
QSYSBasePrompt.getText()
public void setModuleName(String name)
QSYSBasePrompt.setText(String)
public Button getModuleBrowseButton()
public void setModuleItems(String[] items)
public String[] getModuleItems()
public void setEnabled(boolean enabled)
setEnabled
in class QSYSProgramObjectPrompt
public void setSystemConnection(IHost onlyConnection)
QSYSBasePrompt.setShowNewConnectionPrompt(boolean)
.QSYSBasePrompt.setShowNewConnectionPrompt(boolean)
with false, then
this method has the effect of either enabling or disabling the Browser button,
depending if the connection is not-null or null, respectively. This is because
if they cannot create a connection, and no connection is given, then there is
no point in browsing. Note the button is enabled until you call this, so you
probably will need to do a priming call with null, to disable it initially if
the user selects their connection from another widget. It also means you want
to do that priming call after calling QSYSBasePrompt.setShowNewConnectionPrompt(boolean)
with false.
setSystemConnection
in class QSYSProgramObjectPrompt
#setDefaultConnection(SystemConnection)
,
QSYSBasePrompt.setShowNewConnectionPrompt(boolean)
public void setModulePromptLabel(String label)
public void setModuleToolTipText(String tip)
public void setModuleBrowseButtonToolTipText(String tip)
public boolean setModuleFocus()
public void setModuleBrowseButtonFocus()
public void addSelectionListener(SelectionListener listener)
addSelectionListener
in class QSYSProgramObjectPrompt
removeSelectionListener(SelectionListener)
public void removeSelectionListener(SelectionListener listener)
removeSelectionListener
in class QSYSProgramObjectPrompt
addSelectionListener(SelectionListener)
public void addBrowseButtonSelectionListener(SelectionListener listener)
addBrowseButtonSelectionListener
in class QSYSProgramObjectPrompt
#removeNewButtonSelectionListener(SelectionListener)
public void removeBrowseButtonSelectionListener(SelectionListener listener)
removeBrowseButtonSelectionListener
in class QSYSProgramObjectPrompt
#addNewButtonSelectionListener(SelectionListener)
public void addModuleModifyListener(ModifyListener listener)
removeModuleModifyListener(ModifyListener)
public void removeModuleModifyListener(ModifyListener listener)
addModuleModifyListener(ModifyListener)
public void updateHistory()
This is called automatically for you when setText is called. However, for non-readonly versions, you should still call this yourself when OK is successfully pressed on the dialog box.
updateHistory
in class QSYSProgramObjectPrompt
public void setModuleValidator(ValidatorIBMiObject objValidator)
protected IQSYSSelectObjectAction getModuleBrowseAction(Shell shell, IHost defaultConnection, boolean onlyConnection)
protected void populateModuleCombo(SystemHistoryCombo combo, boolean allowGeneric)
protected void addModuleButtonSelectionListener()
protected ISeriesObjectFilterString getModuleFilterString()
public SystemMessage validateLibInput()
validateLibInput
in class QSYSProgramObjectPrompt
public SystemMessage validateObjInput()
validateObjInput
in class QSYSProgramObjectPrompt
public SystemMessage validateModuleInput()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |