|
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 com.ibm.etools.iseries.rse.ui.widgets.QSYSSelectQSYSAndRemoteFileOrFolderForm
public class QSYSSelectQSYSAndRemoteFileOrFolderForm
Class for selecting a QSYS resource and/or a file or folder from Local, IFS or any hierarchical file system (e.g. Linux).
Field Summary | |
---|---|
protected boolean |
addMode
|
protected boolean |
allowFolderSelection
|
protected boolean |
allowForMultipleParents
|
protected boolean |
alwaysEnableOK
|
protected int |
autoExpandDepth
|
protected Object |
caller
|
protected boolean |
callerInstanceOfSystemPromptDialog
|
protected boolean |
callerInstanceOfWizardPage
|
protected boolean |
contentsCreated
|
protected Hashtable |
convertedObjects
|
static String |
copyright
|
protected IHost |
defaultConnection
|
protected SystemFilter[] |
defaultFilters
|
protected boolean |
fileMode
|
protected boolean |
filesOnlyMode
|
protected String |
fileTypes
|
protected boolean |
forceDefaultFiltersNull
|
protected boolean |
initDone
|
protected SelectQSYSAndRemoteObjectAPIProvider |
inputProvider
|
protected IRemoteSelectionAddListener |
iSeriesAddButtonCallback
|
protected SystemRemoteObjectMatcher |
iSeriesObjectMatcher
|
protected SystemFilterSimple |
liblQuickFilter
|
protected Vector |
listeners
|
protected String |
locationPrompt
|
protected ISystemMessageLine |
msgLine
|
protected boolean |
multipleSelectionMode
|
protected Text |
nameEntryValue
|
protected Composite |
outerParent
|
protected IHost |
outputConnection
|
protected Object[] |
outputObjects
|
protected SystemFilter |
preSelectFilter
|
protected String |
preSelectFilterChild
|
protected boolean |
preSelectRoot
|
protected Object |
previousSelection
|
protected static int |
PROMPT_WIDTH
|
protected SystemPropertySheetForm |
ps
|
protected Composite |
ps_composite
|
protected ResourceBundle |
rb
|
protected ISystemAddFileListener |
remoteAddButtonCallback
|
protected SystemRemoteObjectMatcher |
remoteObjectMatcher
|
protected int |
selectionType
|
protected IValidatorRemoteSelection |
selectionValidator
|
protected boolean |
showLiblFilter
|
protected boolean |
showLocationPrompt
|
protected boolean |
showPropertySheet
|
protected boolean |
showRootFilter
|
protected boolean |
showYourLibrariesPrompt
|
protected Label |
spacer1
|
protected Label |
spacer2
|
protected ISystemRegistry |
sr
|
protected boolean |
srcFilesOnly
|
protected SystemViewForm |
tree
|
protected String |
treeTip
|
protected boolean |
valid
|
protected String |
verbage
|
protected Label |
verbageLabel
|
protected List |
viewerFilters
|
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 | |
---|---|
QSYSSelectQSYSAndRemoteFileOrFolderForm(ISystemMessageLine msgLine,
Object caller,
int selectionType,
boolean srcFilesOnly,
boolean fileMode)
Constructor. |
Method Summary | |
---|---|
void |
addFilter(String filterString)
Add a filter that users can expand to start their search. |
void |
addFilter(SystemFilter filter)
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. |
protected SystemFilter[] |
addQuickFilter(SystemFilter newFilter)
Add a filter to the default filter list |
void |
addSelectionChangedListener(ISelectionChangedListener l)
Add a listener to selection change events in the tree |
protected void |
clearErrorMessage()
|
Control |
createContents(Shell shell,
Composite parent)
In this method, we populate the given SWT container with widgets and return the container to the caller. |
ISystemFilter |
createFilterByPrompting(ISystemFilter filterPrompt,
Shell shell)
|
SystemFilter |
createFilterByPrompting(SystemFilter filterPrompt,
Shell shell)
Prompt the user to create a new filter as a result of the user expanding a promptable transient filter (one of the ones created above). |
protected SystemFilterSimple |
createQuickFilter(String name,
String filterString)
Create a transient filter given the name and filter string |
void |
doubleClick(DoubleClickEvent event)
Triggers a selection changed event and then notifies the caller of the form. |
void |
enableAddMode(IRemoteSelectionAddListener caller)
Enable Add mode. |
void |
enableAddMode(ISystemAddFileListener caller)
Enable Add mode. |
protected ISystemViewElementAdapter |
getAdapter(Object o)
Returns the implementation of ISystemViewElement for the given object. |
protected Object |
getFirstSelection(ISelection selection)
Return first item currently selected. |
Control |
getInitialFocusControl()
Return control to recieve initial focus |
protected SystemFilterSimple |
getLiblQuickFilter()
Create a commonly needed transient filter for *LIBL |
boolean |
getMultipleSelectionMode()
Return the multiple selection mode state |
protected SystemFilter[] |
getQuickFilters()
Build and return array of transient filters to be shown when the user expands a connection |
protected ISystemRemoteElementAdapter |
getRemoteAdapter(Object o)
Returns the implementation of ISystemRemoteElement for the given object. |
IHost |
getSelectedConnection()
Return selected connection |
Object |
getSelectedObject()
Return first selected object |
Object[] |
getSelectedObjects()
Return all selected objects. |
protected Object[] |
getSelections(ISelection selection)
Return all items currently selected. |
protected Shell |
getShell()
Return shell of parent dialog or wizard |
SystemViewForm |
getSystemViewForm()
Return the embedded System Tree object. |
boolean |
isPageComplete()
This method can be called by the dialog or wizard page host, to decide whether to enable or disable the next, final or ok buttons. |
void |
removeSelectionChangedListener(ISelectionChangedListener l)
Remove a listener for selection change events |
void |
selectionChanged(SelectionChangedEvent e)
User selected something in the tree. |
void |
setAllowForMultipleParents(boolean flag)
Indicate whether the form should allow selection of objects from different parents |
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 |
protected void |
setErrorMessage(String msg)
|
protected void |
setErrorMessage(SystemMessage msg)
|
void |
setFileTypes(String fileTypes)
For files mode, restrict the files list by a comman-delimited array of file types. |
void |
setFileTypes(String[] fileTypes)
For files mode, restrict the files list by an array of file types |
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 as the text at the top of the form. |
void |
setMessageLine(ISystemMessageLine msgLine)
Often the message line is null at the time of instantiation, so we have to call this after it is created. |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
protected void |
setNameText(String text)
Set the hidden name field that enables the OK button |
void |
setObjectTypes(String[] objTypes)
Set the object types and attributes to subset by, when the selection mode is anything but libraries. |
void |
setPageComplete()
Inform caller of page-complete status of this form |
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 |
setPreSelection(IRemoteFile selection)
Set a file or folder to preselect. |
void |
setRestrictFolders(boolean restrict)
Specify whether setRootFolder should prevent the user from being able to see or select any other folder. |
void |
setRootFolder(IHost connection,
String folderAbsolutePath)
Set the root folder from which to start listing folders or files. |
void |
setRootFolder(IRemoteFile rootFolder)
Set the root folder from which to start listing folders. |
void |
setRootLibrary(IHost connection,
String libraryName)
Set the root library from which to start listing objects. |
void |
setRootLibrary(IQSYSLibrary library)
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 file or folder. |
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 |
setShowYourLibrariesPrompt(boolean show)
Set to false to not show "YourLibraries..." special filter prompt |
void |
setSystemConnection(IHost conn)
Set the connection to restrict the user to seeing |
void |
setSystemTypes(IRSESystemType[] systemTypes)
Restrict to certain system types |
boolean |
toggleShowPropertySheet(Shell shell,
Control contents)
Show or hide the property sheet. |
boolean |
verify()
Completes processing of the wizard page or dialog. |
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 static final int PROMPT_WIDTH
protected Label verbageLabel
protected Label spacer1
protected Label spacer2
protected Text nameEntryValue
protected SystemViewForm tree
protected SystemPropertySheetForm ps
protected ISystemMessageLine msgLine
protected Composite outerParent
protected Composite ps_composite
protected ISystemRegistry sr
protected String verbage
protected String treeTip
protected int selectionType
protected boolean showPropertySheet
protected boolean multipleSelectionMode
protected Vector listeners
protected IValidatorRemoteSelection selectionValidator
protected boolean srcFilesOnly
protected boolean showLiblFilter
protected boolean showYourLibrariesPrompt
protected boolean forceDefaultFiltersNull
protected boolean addMode
protected SystemRemoteObjectMatcher iSeriesObjectMatcher
protected IRemoteSelectionAddListener iSeriesAddButtonCallback
protected IHost defaultConnection
protected String locationPrompt
protected String fileTypes
protected boolean fileMode
protected boolean valid
protected boolean filesOnlyMode
protected boolean showRootFilter
protected boolean alwaysEnableOK
protected boolean allowForMultipleParents
protected boolean showLocationPrompt
protected boolean allowFolderSelection
protected ISystemAddFileListener remoteAddButtonCallback
protected SystemRemoteObjectMatcher remoteObjectMatcher
protected Object[] outputObjects
protected IHost outputConnection
protected ResourceBundle rb
protected SystemFilter preSelectFilter
protected boolean initDone
protected boolean contentsCreated
protected SelectQSYSAndRemoteObjectAPIProvider inputProvider
protected SystemFilterSimple liblQuickFilter
protected Hashtable convertedObjects
protected SystemFilter[] defaultFilters
protected String preSelectFilterChild
protected boolean preSelectRoot
protected Object caller
protected boolean callerInstanceOfWizardPage
protected boolean callerInstanceOfSystemPromptDialog
protected int autoExpandDepth
protected Object previousSelection
protected List viewerFilters
Constructor Detail |
---|
public QSYSSelectQSYSAndRemoteFileOrFolderForm(ISystemMessageLine msgLine, Object caller, int selectionType, boolean srcFilesOnly, boolean fileMode)
msgLine
- a GUI widget capable of writing error messages to.caller
- the wizardpage or dialog hosting this form.selectionType
- an enumeration indicating the type of iSeries object to browse for, as
specified in IISeriesSelectionTypes
srcFilesOnly
- if the selection type is files or members, indicate whether to restrict to source files.fileMode
- true
if in select-file mode, false
if in select-folder mode for hierarchical file systems, such as IFS, Linux, Unix, etc.Method Detail |
---|
public void setAllowForMultipleParents(boolean flag)
public void setSystemConnection(IHost conn)
public void setDefaultConnection(IHost conn)
public void setShowNewConnectionPrompt(boolean show)
public void setSystemTypes(IRSESystemType[] systemTypes)
systemTypes
- the system types to restrict what connections are shown and what types of connections
the user can createcom.ibm.etools.systems.core.ISystemTypes
public void setRootFolder(IHost connection, String folderAbsolutePath)
connection
- The connection to the remote system containing the root folderfolderAbsolutePath
- The fully qualified folder to start listing from (eg: "\folder1\folder2")com.ibm.etools.systems.files.RemoteFileFilterString
public void setRootFolder(IRemoteFile rootFolder)
rootFolder
- The IRemoteFile object representing the remote folder to start the list fromcom.ibm.etools.systems.files.RemoteFileFilterString
public void setPreSelection(IRemoteFile selection)
public void setFileTypes(String[] fileTypes)
This must be called BEFORE setRootFolder!
public void setFileTypes(String fileTypes)
This must be called BEFORE setRootFolder!
public void setRestrictFolders(boolean restrict)
public void enableAddMode(ISystemAddFileListener caller)
When a library is selected, the caller is called back to decide to enable the Add button or not.
public void setShowYourLibrariesPrompt(boolean show)
public void setShowLiblFilter(boolean show)
public void setMessage(String message)
public void setSelectionTreeToolTipText(String tip)
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 addFilter(SystemFilter filter)
This is really a filter versus a filter string, so you can decide on the name
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 strings or SystemFilter objectspublic void setRootLibrary(IHost connection, String libraryName)
Not applicable for select-library mode.
connection
- The connection to the remote system containing the root librarylibraryName
- The name of the library to start listing frompublic void setRootLibrary(IQSYSLibrary library)
Not applicable for select-library mode.
library
- An ISeriesLibrary objectpublic 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".
Here are the default object types per selection type:
if (selectionType == BROWSEFOR_FILE)
setObjectTypes(new String[] {"*FILE:*"});
else if (selectionType == BROWSEFOR_MEMBER)
setObjectTypes(new String[] {"*FILE:PF-*"});
else if (selectionType == BROWSEFOR_FIELD)
setObjectTypes(new String[] {"*FILE:PF-DTA"});
else if (selectionType == BROWSEFOR_RECORD)
setObjectTypes(new String[] {"*FILE:DSPF", "*FILE:PRTF"});
else if (selectionType == BROWSEFOR_COMMAND)
setObjectTypes(new String[] {"*CMD"});
public void setMemberTypes(String[] mbrTypes)
Each String can be a simple type like "RPG" or a generic string like "RPG*"
public void setAutoExpandDepth(int depth)
public void setShowPropertySheet(boolean show)
Default is false
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 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 members, say, you also want to allow the user to select a file, with the meaning being that all members within the file are implicitly selected.
public void addSelectionChangedListener(ISelectionChangedListener l)
public void removeSelectionChangedListener(ISelectionChangedListener l)
public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
public Object getSelectedObject()
public Object[] getSelectedObjects()
setMultipleSelectionMode(boolean)
public IHost getSelectedConnection()
public SystemViewForm getSystemViewForm()
public boolean getMultipleSelectionMode()
public void setMessageLine(ISystemMessageLine msgLine)
public Control getInitialFocusControl()
public boolean toggleShowPropertySheet(Shell shell, Control contents)
shell
- Use getShell() in your dialog or wizard pagecontents
- Use getContents() in your dialog or wizard page
public Control createContents(Shell shell, Composite parent)
parent
- The parent compositepublic boolean verify()
protected void setNameText(String text)
protected ISystemViewElementAdapter getAdapter(Object o)
protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
public void selectionChanged(SelectionChangedEvent e)
protected Object getFirstSelection(ISelection selection)
protected Object[] getSelections(ISelection selection)
public boolean isPageComplete()
public void setPageComplete()
protected void clearErrorMessage()
protected void setErrorMessage(String msg)
protected void setErrorMessage(SystemMessage msg)
protected SystemFilter[] getQuickFilters()
protected SystemFilter[] addQuickFilter(SystemFilter newFilter)
protected SystemFilterSimple createQuickFilter(String name, String filterString)
protected SystemFilterSimple getLiblQuickFilter()
public SystemFilter createFilterByPrompting(SystemFilter filterPrompt, Shell shell) throws Exception
Exception
protected Shell getShell()
public void doubleClick(DoubleClickEvent event)
IDoubleClickListener
public ISystemFilter createFilterByPrompting(ISystemFilter filterPrompt, Shell shell) throws Exception
Exception
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |