|
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 SystemBaseDialogAction com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseDialogAction com.ibm.etools.iseries.rse.ui.actions.select.IBMiSelectAbstractAction
public class IBMiSelectAbstractAction
The base class for all IBM i selection actions for libraries, objects, members, records and fields. Handles all common methods
To configure the dialog, call these input methods:
#setSystemConnection(SystemConnection)
or #setDefaultConnection(SystemConnection)
addLibraryFilter(String)
setObjectTypes(String[])
setShowPropertySheet(boolean)
or setShowPropertySheet(boolean,boolean)
setShowNewConnectionPrompt(boolean)
and setShowLiblFilter(boolean)
#setRootLibrary(SystemConnection, String)
#enableAddMode(com.ibm.etools.systems.core.ui.IRemoteSelectionAddListener)
setAddModeLabel(String,String)
#setSelectionValidator(com.ibm.etools.systems.core.ui.IValidatorRemoteSelection)
To override the default prompt labels and tooltip text, call these input methods:
setMessage(String)
setDialogTitle(String)
setSelectionTreeToolTipText(String)
setMultipleSelectionMode(boolean)
#setPreSelection(SystemConnection,String,String)
or #setPreSelection(SystemConnection,String,String)
setAutoExpandDepth(int)
After running, call these methods to get the output:
#getSelectedLibrary()
or getSelectedObjects()
getSelectedConnection()
#getSelectedLibraryName()
Constructor Summary | |
---|---|
IBMiSelectAbstractAction(Shell shell,
String label,
String tooltip,
int selectionType)
Base constructor used by child classes, to supply their own action label. |
Method Summary | |
---|---|
void |
addFilter(String filterString)
Add a filter that users can expand to start their search. |
void |
addLibraryFilter(String libraryFilter)
Add a library filter to the initial list shown when a connection is expanded The library name can be simple or generic. |
protected Dialog |
createDialog(Shell parent)
If you decide to use the supplied run method as is, then you must override this method to create and return the dialog that is displayed by the default run method implementation. |
protected void |
enableAddMode(boolean enable)
Child class method to tell us that add mode has been enabled. |
void |
enableAddMode(IRemoteSelectionAddListener caller)
Enable Add mode. |
protected Object |
getDialogValue(Dialog dlg)
Required by parent. |
protected SubSystem |
getFileSubSystem(IHost connection)
Get the file subsystem given a connection |
protected SelectQSYSDialog |
getSelectDialog(Shell shell)
This is the overridable point for the dialog. |
Object |
getSelected()
Return selected ISeriesXXX object |
IHost |
getSelectedConnection()
Return selected connection |
Object[] |
getSelectedObjects()
Return all selected objects. |
void |
reset()
Reset all attributes to initial values. |
void |
setAddModeLabel(String addLabel,
String addToolTipText)
Set the Add button label and tooltip text. |
void |
setAutoExpandDepth(int depth)
Specify the zero-based auto-expand level for the tree. |
void |
setDefaultConnection(IHost conn)
Set the connection to pre-select and expand |
void |
setDialogTitle(String title)
Set the dialog title. |
void |
setMessage(String message)
Set the message shown at the top. |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
void |
setObjectTypes(String[] objTypes)
Set the object types and attributes to subset by. |
void |
setPreSelection(IHost connection,
String libraryName)
Set an library to preselect. |
void |
setPreSelection(IHost connection,
String libraryName,
String objectName)
Set an object to preselect. |
void |
setRootLibrary(IHost connection,
String libraryName)
Set the root library from which to start listing objects. |
void |
setSelectionTreeToolTipText(String tip)
Set the tooltip text for the remote systems tree from which an item is selected. |
void |
setSelectionValidator(IValidatorRemoteSelection selectionValidator)
Specify a validator to use when the user selects a remote object This allows you to decide if OK should be enabled or not for that remote object. |
void |
setShowLiblFilter(boolean show)
Set to false to not show "*LIBL" library filter on initial expand of a connection. |
void |
setShowNewConnectionPrompt(boolean show)
Set to true if a "New Connection..." special connection is to be shown for creating new connections |
void |
setShowPropertySheet(boolean show)
Show the property sheet on the right hand side, to show the properties of the selected object. |
void |
setShowPropertySheet(boolean show,
boolean initialState)
Show the property sheet on the right hand side, to show the properties of the selected object. |
void |
setShowYourLibrariesPrompt(boolean show)
Set to false to not show "YourLibraries..." special filter prompt |
void |
setSystemConnection(IHost conn)
Set the system connection to use. |
Methods inherited from class com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseDialogAction |
---|
getIBMiConnection, updateSelection |
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 SelectQSYSDialog dlg
protected int selectionType
protected int autoExpandDepth
protected IHost onlyConnection
protected IHost defaultConnection
protected IRemoteSelectionAddListener addButtonCallback
protected Vector<String> addFilterStrings
protected String title
protected String verbage
protected String treeTip
protected String addLabel
protected String addToolTipText
protected String rootLibraryName
protected String preSelectLibraryName
protected String preSelectObjectName
protected String[] objTypes
protected boolean addButton
protected boolean showPropertySheet
protected boolean showPropertySheetDetailsButtonInitialState
protected boolean showPropertySheetDetailsButton
protected boolean showNewConnectionPrompt
protected boolean showYourLibrariesPrompt
protected boolean showLiblFilter
protected boolean multipleSelectionMode
protected IHost outputConnection
protected static final IQSYSObject[] EMPTY_OBJECT_ARRAY
protected static final String[] EMPTY_STRING_ARRAY
Constructor Detail |
---|
public IBMiSelectAbstractAction(Shell shell, String label, String tooltip, int selectionType)
Method Detail |
---|
public void setSystemConnection(IHost conn)
#setDefaultConnection(SystemConnection)
public void setDefaultConnection(IHost conn)
public void setShowNewConnectionPrompt(boolean show)
public void setShowYourLibrariesPrompt(boolean show)
public void setShowLiblFilter(boolean show)
protected void enableAddMode(boolean enable)
public void setAddModeLabel(String addLabel, String addToolTipText)
public void enableAddMode(IRemoteSelectionAddListener caller)
When any remote object is selected, the caller is called back to decide to enable the Add button or not.
public void setShowPropertySheet(boolean show)
Default is false
public void setShowPropertySheet(boolean show, boolean initialState)
This overload shows a Details>>> button so the user can decide if they want to see the property sheet.
show
- True if to show the property sheet within the dialoginitialState
- True if the property is to be initially displayed, false if it is not
to be displayed until the user presses the Details button.public void addFilter(String filterString)
This is really a filter string versus a filter, but it is realized in the GUI as a temporary filter.
public void addLibraryFilter(String libraryFilter)
public void setObjectTypes(String[] objTypes)
public void setRootLibrary(IHost connection, String libraryName)
connection
- The connection to the remote system containing the root librarylibraryName
- The name of the library to start listing frompublic void setPreSelection(IHost connection, String libraryName)
public void setPreSelection(IHost connection, String libraryName, String objectName)
public void setMultipleSelectionMode(boolean multiple)
If you set this to true you must use getSelectedObjects()
Further, if you turn this on, it has the side effect of allowing the user to select any remote object. The assumption being if you are prompting for children, you also want to allow the user to select a parent, with the meaning being that all children within the parent are implicitly selected.
To restrict what types of objects can be selected, use #setSelectionValidator(com.ibm.etools.systems.core.ui.IValidatorRemoteSelection)
public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
public void setAutoExpandDepth(int depth)
public void reset()
public void setDialogTitle(String title)
public void setMessage(String message)
public void setSelectionTreeToolTipText(String tip)
public Object getSelected()
public Object[] getSelectedObjects()
It will always return null if the user cancelled the dialog.
setMultipleSelectionMode(boolean)
public IHost getSelectedConnection()
protected Dialog createDialog(Shell parent)
If you override run with your own, then simply implement this to return null as it won't be used.
#run()
protected SubSystem getFileSubSystem(IHost connection)
protected SelectQSYSDialog getSelectDialog(Shell shell)
protected Object getDialogValue(Dialog dlg)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |