|
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 SystemPromptDialog com.ibm.etools.iseries.rse.ui.dialogs.QSYSSelectQSYSAndRemoteFileOrFolderDialog
public class QSYSSelectQSYSAndRemoteFileOrFolderDialog
Dialog for allowing users to select a library, object, member, etc from a remote iSeries or a file or folder from a remote iSeries or universal system.
Call these methods to configure the typical functionality of the dialog
#setSystemConnection(SystemConnection)
or #setDefaultConnection(SystemConnection)
setObjectTypes(String[])
setMemberTypes(String[])
setShowPropertySheet(boolean)
#enableAddMode(com.ibm.etools.systems.core.ui.IRemoteSelectionAddListener)
setAddModeLabel(String, String)
Call these methods to configure the more advanced functionality of the dialog
setShowNewConnectionPrompt(boolean)
and setShowLiblFilter(boolean)
setAutoExpandDepth(int)
#setRootLibrary(SystemConnection, String)
addFilter(String)
or addFilters(Vector)
setMultipleSelectionMode(boolean)
#setPreSelection(SystemConnection,String,String)
or #setPreSelection(SystemConnection,String,String)
#setSelectionValidator(com.ibm.etools.systems.core.ui.IValidatorRemoteSelection)
Call these methods to configure the text on the dialog
After running, call these methods to get the output:
Field Summary | |
---|---|
protected IRemoteSelectionAddListener |
addButtonCallback
|
protected boolean |
addMode
|
static String |
copyright
|
protected QSYSSelectQSYSAndRemoteFileOrFolderForm |
form
|
protected boolean |
multipleSelectionMode
|
protected IHost |
outputConnection
|
protected int |
selectionType
|
protected boolean |
srcFilesOnly
|
Fields inherited from interface com.ibm.etools.iseries.rse.ui.widgets.IQSYSSelectionTypes |
---|
BROWSEFOR_ANY, BROWSEFOR_COMMAND, BROWSEFOR_CRT_COMMAND, BROWSEFOR_DTAARA, BROWSEFOR_DTAQ, BROWSEFOR_FIELD, BROWSEFOR_FILE, BROWSEFOR_JOB, BROWSEFOR_JOBD, BROWSEFOR_JOBQ, BROWSEFOR_LIBRARY, BROWSEFOR_MEMBER, BROWSEFOR_MESSAGE, BROWSEFOR_MODULE, BROWSEFOR_MSGF, BROWSEFOR_OBJECT, BROWSEFOR_PGM, BROWSEFOR_PGM_MODULE, BROWSEFOR_PGMSRVPGM, BROWSEFOR_PROCEDURE, BROWSEFOR_RECORD, BROWSEFOR_SRVPGM, Copyright |
Constructor Summary | |
---|---|
QSYSSelectQSYSAndRemoteFileOrFolderDialog(Shell shell,
int selectionType,
boolean srcFilesOnly,
boolean fileMode)
Constructor |
|
QSYSSelectQSYSAndRemoteFileOrFolderDialog(Shell shell,
String title,
int selectionType,
boolean srcFilesOnly,
boolean fileMode)
Constructor when you want to supply your own title. |
Method Summary | |
---|---|
protected Object |
addButtonPressed(IHost selectedConnection,
Object[] selectedObjects)
The user has pressed the Add button. |
void |
addFilter(String filterString)
Add a filter that users can expand to start their search. |
void |
addFilters(Vector filterStrings)
Add one or more filters that users can expand to start their search. |
boolean |
close()
We have to override close to ensure that we reset the form to null |
protected Control |
createInner(Composite parent)
Private method. |
protected ISystemMessageLine |
createMessageLine(Composite c)
Create message line. |
void |
doubleClick(DoubleClickEvent event)
|
void |
enableAddMode(IRemoteSelectionAddListener caller)
Enable Add mode. |
protected QSYSSelectQSYSAndRemoteFileOrFolderForm |
getForm(int selectionTypes,
boolean srcFilesOnly,
boolean fileMode)
Private method. |
protected Control |
getInitialFocusControl()
Private method. |
boolean |
getMultipleSelectionMode()
Return the multiple selection mode as set by setMultipleSelectionMode(boolean) |
IHost |
getSelectedConnection()
Return selected connection |
Object |
getSelectedObject()
Return selected ISeriesXXX object (or first one if multiple selection enabled) |
Object[] |
getSelectedObjects()
Return all selected objects. |
protected boolean |
processAdd()
Private method. |
protected boolean |
processDetails(boolean hideMode)
Private method. |
protected boolean |
processOK()
Private method. |
void |
setAddModeLabel(String addLabel,
String addToolTipText)
Method that allows setting the label and tooltip text of the Add button. |
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 |
setMemberTypes(String[] mbrTypes)
Set the members types and attributes to subset by, when the selection mode is members |
void |
setMessage(String message)
Set the message shown at the top of the form |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
void |
setObjectTypes(String[] objTypes)
Set the object types and attributes to subset by, when the selection mode is objects (this is called for you for other types of selections). |
void |
setPageComplete(boolean complete)
|
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. |
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 restrict the user to selecting files or folders from |
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 QSYSSelectQSYSAndRemoteFileOrFolderForm form
protected boolean srcFilesOnly
protected int selectionType
protected IHost outputConnection
protected boolean multipleSelectionMode
protected boolean addMode
protected IRemoteSelectionAddListener addButtonCallback
Constructor Detail |
---|
public QSYSSelectQSYSAndRemoteFileOrFolderDialog(Shell shell, int selectionType, boolean srcFilesOnly, boolean fileMode)
shell
- The shell to hang the dialog off ofselectionType
- An enumeration indicating the type of object to browse for, as
specified in IISeriesSelectionTypes
srcFilesOnly
- If the selection type is files or members, indicate whether to restrict to source filespublic QSYSSelectQSYSAndRemoteFileOrFolderDialog(Shell shell, String title, int selectionType, boolean srcFilesOnly, boolean fileMode)
shell
- The shell to hang the dialog off oftitle
- The title to give the dialogselectionType
- An enumeration indicating the type of object to browse for, as
specified in com.ibm.etools.iseries.core.ui.widgets.IISeriesSelectionTypes
srcFilesOnly
- If the selection type is files or members, indicate whether to restrict to source filesMethod Detail |
---|
public void setSystemConnection(IHost conn)
public void setDefaultConnection(IHost conn)
public void setShowNewConnectionPrompt(boolean show)
public void setShowYourLibrariesPrompt(boolean show)
public void setShowLiblFilter(boolean show)
public void setMessage(String message)
public void setSelectionTreeToolTipText(String tip)
public void setAutoExpandDepth(int depth)
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 addFilters(Vector filterStrings)
These are really filter strings versus filters, but they are realized in the GUI as temporary filters.
filterstrings
- Vector of stringspublic 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 setObjectTypes(String[] objTypes)
Each String can be a simple type like "*FILE" or a type and attribute, colon-separated, like "*FILE:DSPF".
public void setMemberTypes(String[] mbrTypes)
Each String can be a simple type like "RPG" or a generic string like "RPG*"
public void enableAddMode(IRemoteSelectionAddListener caller)
The caller will be called back when any remote object(s) is/are selected to decide whether to enable the Add button. It is also called when Add is pressed.
public void setAddModeLabel(String addLabel, String addToolTipText)
public void setShowPropertySheet(boolean show)
This overload always shows the property sheet
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 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 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 boolean getMultipleSelectionMode()
public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
public Object getSelectedObject()
public Object[] getSelectedObjects()
setMultipleSelectionMode(boolean)
public IHost getSelectedConnection()
protected Control getInitialFocusControl()
SystemPromptDialog#getInitialFocusControl()
protected Control createInner(Composite parent)
SystemPromptDialog#createInner(Composite)
protected QSYSSelectQSYSAndRemoteFileOrFolderForm getForm(int selectionTypes, boolean srcFilesOnly, boolean fileMode)
protected ISystemMessageLine createMessageLine(Composite c)
protected boolean processOK()
Called when user presses OK button. Return true to close dialog. Return false to not close dialog.
protected boolean processDetails(boolean hideMode)
Called when user presses DETAILS button.
Note the text is automatically toggled for us! We need only do whatever the functionality is that we desire
hideMode
- the current state of the details toggle, prior to this request. If we return true from
this method, this state and the button text will be toggled.
public void setPageComplete(boolean complete)
public boolean close()
protected boolean processAdd()
Called when user presses Add button.
protected Object addButtonPressed(IHost selectedConnection, Object[] selectedObjects)
selectedConnection
- The connection the object was selected inselectedObjects
- Will be a list of selected objects, such as ISeriesLibrary or ISeriesMember
public void doubleClick(DoubleClickEvent event)
IDoubleClickListener
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |