|
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
public class QSYSProgramObjectPrompt
This re-usable composite widget is for prompting the user for an object name.
The object 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 objects are qualified by library names so this also prompts for the library.
The composite is layed as follows:
Library: ______________________v Browse...
* Program
______________________v Browse...
* Service Program
______________________v Browse...
You must specify whether this prompt is for a generic object name like ABC* or a scalar object name like ABC1. Beyond appropriate error checking it also affects the special-values contents of the dropdown.
#setObjectChangeListener(IISeriesObjectPromptListener)
Field Summary | |
---|---|
protected boolean |
allowEmpty
|
protected boolean |
allowGeneric
|
protected boolean |
allowLibl
|
protected Button |
browseProgramButton
|
protected Button |
browseServiceProgramButton
|
static String |
copyright
|
static String |
CURLIB
|
protected ISeriesObjectFilterString |
filterString
|
static String |
LIBL
|
protected ValidatorIBMiObject |
libValidator
|
protected IQSYSObjectPromptListener |
listener
|
protected String[] |
objTypes
|
static String |
PGM
|
protected ValidatorIBMiProgram |
pgmValidator
|
protected Button |
programRadioButton
|
protected SystemHistoryCombo |
promptProgramCombo
|
protected Label |
promptProgramLabel
|
protected SystemHistoryCombo |
promptServiceProgramCombo
|
protected Label |
promptServiceProgramLabel
|
protected Button |
serviceProgramRadioButton
|
static String |
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 |
Constructor Summary | |
---|---|
QSYSProgramObjectPrompt(Composite parent)
Constructor when generic names are allowed and no special style is desired for the composite |
|
QSYSProgramObjectPrompt(Composite parent,
int style)
Constructor when generic names are allowed |
|
QSYSProgramObjectPrompt(Composite parent,
int style,
boolean allowGeneric,
boolean allowLibl)
Constructor |
|
QSYSProgramObjectPrompt(Composite parent,
int style,
boolean allowGeneric,
boolean allowLibl,
boolean allowEmpty)
Constructor |
Method Summary | |
---|---|
void |
addBrowseButtonSelectionListener(SelectionListener listener)
Register a listener interested in when the either the library or object browse button is selected |
void |
addLibraryModifyListener(ModifyListener listener)
Register a listener interested in library entry field modify events |
void |
addObjectModifyListener(ModifyListener listener)
Register a listener interested in object entry field modify events |
protected void |
addOurButtonSelectionListener()
Library's Browse button pressed handler |
void |
addRadioButtonsSelectionListener(SelectionListener listener)
Register a listener interested in a radio button selection 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 |
protected void |
createObjectWidgets(boolean allowGeneric)
Create our unique object-related widgets. |
void |
enableProgramPrompt()
Program is selected by the user |
void |
enableServiceProgramPrompt()
Service Program is selected by the user |
Button |
getAcriveProgramObjectBrowseButton()
Return the object Browse... |
SystemHistoryCombo |
getActiveProgramObjectCombo()
Get combobox of the active program object control |
String[] |
getActiveProgramObjectItems()
Get the items in the object combo field |
String |
getActiveProgramObjectName()
Get the user entered or selected object name. |
String |
getActiveProgramObjectType()
Get program object type of the active program object control either *PGM or *SRVPGM |
protected IIBMiSelectAction |
getBrowseAction(Shell shell,
IHost defaultConnection,
boolean onlyConnection)
Overridable method. |
Button |
getLibraryBrowseButton()
Return the library Browse... |
SystemHistoryCombo |
getLibraryCombo()
Return the combo box widget for the library prompt |
String |
getLibraryName()
Get the user entered or selected library name. |
Label |
getLibraryPromptLabel()
Return the library prompt label widget. |
protected IQSYSSelectObjectAction |
getObjectBrowseAction(Shell shell,
IHost defaultConnection,
boolean onlyConnection,
int programType)
Overridable method. |
protected ISeriesObjectFilterString |
getObjectFilterString()
Get the object filter string to use in building the quick filter string. |
Label |
getObjectPromptLabel()
Return the object prompt label widget |
protected String[] |
getObjectTypes()
Override from parent so we can set the file types for the browse button's default filter |
SystemHistoryCombo |
getProgramCombo()
Return the combo box widget for the Program prompt |
String |
getQualifiedName()
Get the qualified name: library/programObject |
SystemHistoryCombo |
getServiceProgramCombo()
Return the combo box widget for the Service Program prompt |
protected void |
handleBrowseButtonSelectionEvent(IQSYSSelectObjectAction browseObjectAction,
SystemHistoryCombo programObjectCombo)
Enables our browse button for objects. |
protected void |
init(boolean allowGeneric,
boolean allowLibl,
boolean allowEmpty)
Do initialization. |
boolean |
isProgramRadioButtonSelected()
Getter method for programRadioButton selection |
boolean |
isServiceProgramRadioButtonSelected()
Getter method for serviceProgramRadioButton selection |
protected boolean |
isSpecialName(String nameWithAsterisk)
Overridable method to distinguish between a generic name like *A and a special name like *USRPRF |
protected void |
populateLibraryCombo(SystemHistoryCombo combo,
boolean allowGeneric,
boolean allowLibl)
Populates our library combo. |
protected void |
populateProgramObjectCombo(SystemHistoryCombo combo,
boolean allowGeneric)
Populates our object combo. |
void |
removeBrowseButtonSelectionListener(SelectionListener listener)
Remove a previously set browse button selection listener. |
void |
removeLibraryModifyListener(ModifyListener listener)
Remove a previously set library entry field listener. |
void |
removeObjectChangeListener()
Remove object change listener previously set in setProgramChangeListener |
void |
removeObjectModifyListener(ModifyListener listener)
Remove a previously set object entry field listener. |
void |
removeRadioButtonSelectionListener(SelectionListener listener)
Remove a previously set radio button selection events listener. |
void |
removeSelectionListener(SelectionListener listener)
Remove a previously set combo box selection listener. |
boolean |
setActiveProgramObjectFocus()
Set the focus to the object combo field |
void |
setActiveProgramObjectItems(String[] items)
Set the items in the object combo field |
void |
setActiveProgramObjectName(String name)
Set the object name displayed in the combo box. |
void |
setDefaultConnection(IHost defaultConnection)
Set the default connection to preselect when Browse is pressed. |
void |
setEnabled(boolean enabled)
Disable/Enable all the child controls. |
void |
setLibraryBrowseButtonFocus()
Set the focus to the library browse button |
void |
setLibraryBrowseButtonToolTipText(String tip)
Set the tooltip text for the library browse button |
boolean |
setLibraryFocus()
Set the focus to the library combo field |
void |
setLibraryItems(String[] items)
Set the items in the library combo field |
void |
setLibraryName(String name)
Set the library name displayed in the combo box. |
void |
setLibraryPromptLabel(String label)
Set the Library prompt label text |
void |
setLibraryToolTipText(String tip)
Set the tooltip text for the library combo field |
void |
setLibraryValidator(ValidatorIBMiObject libValidator)
Set the library validator for syntax checking There is one supplied for you so you rarely need to call this. |
void |
setObjectBrowseButtonFocus()
Set the focus to the object browse button |
void |
setObjectBrowseButtonToolTipText(String tip)
Set the tooltip text for the object browse button |
void |
setObjectChangeListener(IQSYSObjectPromptListener listener)
Identify caller that is interested in being informed of live error checking status. |
void |
setObjectPromptLabel(String label)
Set the Object prompt label text |
void |
setObjectToolTipText(String tip)
Set the tooltip text for the object combo field |
void |
setObjectTypes(String[] types)
Set the object types to filter by. |
void |
setObjectValidator(ValidatorIBMiProgram pgmValidator)
Set the object 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. |
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 |
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
public static final String PGM
public static final String SRVPGM
public static final String LIBL
public static final String CURLIB
protected Button programRadioButton
protected Button serviceProgramRadioButton
protected Label promptProgramLabel
protected SystemHistoryCombo promptProgramCombo
protected Button browseProgramButton
protected Label promptServiceProgramLabel
protected SystemHistoryCombo promptServiceProgramCombo
protected Button browseServiceProgramButton
protected IQSYSObjectPromptListener listener
protected boolean allowGeneric
protected boolean allowLibl
protected boolean allowEmpty
protected String[] objTypes
protected ISeriesObjectFilterString filterString
protected ValidatorIBMiObject libValidator
protected ValidatorIBMiProgram pgmValidator
Constructor Detail |
---|
public QSYSProgramObjectPrompt(Composite parent)
parent
- Parent composite#setDefaultConnection(SystemConnection)
public QSYSProgramObjectPrompt(Composite parent, int style)
parent
- Parent compositestyle
- The SWT style flags for overall composite widget. Typically just pass SWT.NULL#setDefaultConnection(SystemConnection)
public QSYSProgramObjectPrompt(Composite parent, int style, boolean allowGeneric, boolean allowLibl)
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 library#setDefaultConnection(SystemConnection)
public QSYSProgramObjectPrompt(Composite parent, int style, boolean allowGeneric, boolean allowLibl, boolean allowEmpty)
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 libraryallowEmpty
- Pass true to allow for empty library and object names#setDefaultConnection(SystemConnection)
Method Detail |
---|
public void setObjectChangeListener(IQSYSObjectPromptListener listener)
public void removeObjectChangeListener()
public void setDefaultConnection(IHost defaultConnection)
setDefaultConnection
in class QSYSBasePrompt
#setSystemConnection(SystemConnection)
public void setSystemConnection(IHost onlyConnection)
public SystemHistoryCombo getLibraryCombo()
public SystemHistoryCombo getProgramCombo()
public SystemHistoryCombo getServiceProgramCombo()
public SystemHistoryCombo getActiveProgramObjectCombo()
public boolean isProgramRadioButtonSelected()
public boolean isServiceProgramRadioButtonSelected()
public String getActiveProgramObjectType()
public String getLibraryName()
QSYSBasePrompt.getText()
public void setLibraryName(String name)
QSYSBasePrompt.setText(String)
public String getActiveProgramObjectName()
QSYSBasePrompt.getText()
public void setActiveProgramObjectName(String name)
QSYSBasePrompt.setText(String)
public void setObjectTypes(String[] types)
public String getQualifiedName()
public Button getLibraryBrowseButton()
public Button getAcriveProgramObjectBrowseButton()
public void setLibraryItems(String[] items)
public void setActiveProgramObjectItems(String[] items)
public String[] getActiveProgramObjectItems()
public void setEnabled(boolean enabled)
setEnabled
in class QSYSBasePrompt
public void setLibraryPromptLabel(String label)
public void setObjectPromptLabel(String label)
public Label getLibraryPromptLabel()
public Label getObjectPromptLabel()
public void setLibraryToolTipText(String tip)
public void setObjectToolTipText(String tip)
public void setLibraryBrowseButtonToolTipText(String tip)
public void setObjectBrowseButtonToolTipText(String tip)
public boolean setLibraryFocus()
public boolean setActiveProgramObjectFocus()
public void setLibraryBrowseButtonFocus()
public void setObjectBrowseButtonFocus()
public void addSelectionListener(SelectionListener listener)
addSelectionListener
in class QSYSBasePrompt
addSelectionListener(SelectionListener)
public void removeSelectionListener(SelectionListener listener)
removeSelectionListener
in class QSYSBasePrompt
removeSelectionListener(SelectionListener)
public void addRadioButtonsSelectionListener(SelectionListener listener)
public void removeRadioButtonSelectionListener(SelectionListener listener)
public void addBrowseButtonSelectionListener(SelectionListener listener)
addBrowseButtonSelectionListener
in class QSYSBasePrompt
#removeNewButtonSelectionListener(SelectionListener)
public void removeBrowseButtonSelectionListener(SelectionListener listener)
removeBrowseButtonSelectionListener
in class QSYSBasePrompt
#addNewButtonSelectionListener(SelectionListener)
public void addLibraryModifyListener(ModifyListener listener)
removeLibraryModifyListener(ModifyListener)
public void addObjectModifyListener(ModifyListener listener)
removeObjectModifyListener(ModifyListener)
public void removeLibraryModifyListener(ModifyListener listener)
addLibraryModifyListener(ModifyListener)
public void removeObjectModifyListener(ModifyListener listener)
addObjectModifyListener(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 QSYSBasePrompt
public void setLibraryValidator(ValidatorIBMiObject libValidator)
public void setObjectValidator(ValidatorIBMiProgram pgmValidator)
protected void createObjectWidgets(boolean allowGeneric)
public void enableProgramPrompt()
public void enableServiceProgramPrompt()
protected void init(boolean allowGeneric, boolean allowLibl, boolean allowEmpty)
protected IIBMiSelectAction getBrowseAction(Shell shell, IHost defaultConnection, boolean onlyConnection)
getBrowseAction
in class QSYSBasePrompt
protected IQSYSSelectObjectAction getObjectBrowseAction(Shell shell, IHost defaultConnection, boolean onlyConnection, int programType)
Internal use.
protected void populateLibraryCombo(SystemHistoryCombo combo, boolean allowGeneric, boolean allowLibl)
protected void populateProgramObjectCombo(SystemHistoryCombo combo, boolean allowGeneric)
protected void addOurButtonSelectionListener()
addOurButtonSelectionListener
in class QSYSBasePrompt
protected void handleBrowseButtonSelectionEvent(IQSYSSelectObjectAction browseObjectAction, SystemHistoryCombo programObjectCombo)
protected boolean isSpecialName(String nameWithAsterisk)
protected String[] getObjectTypes()
protected ISeriesObjectFilterString getObjectFilterString()
public SystemMessage validateLibInput()
public SystemMessage validateObjInput()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |