|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.dialogs.Dialog
com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
com.ibm.etools.systems.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog
Dialog for allowing users to select a remote file or folder. This is a thin dialog wrapper on top of * the SystemSelectRemoteFileOrFolderForm widget, which you could optionally imbed directly into your own * dialog or wizard page. *
* Call these methods to configure the functionality of the dialog *
or #setDefaultConnection(SystemConnection)
* setShowNewConnectionPrompt(boolean)
* setSystemTypes(String[])
* setAutoExpandDepth(int)
* setRootFolder(SystemConnection, String)
or setRootFolder(IRemoteFile)
or setPreSelection(IRemoteFile)
* setFileTypes(String[])
or setFileTypes(String)
* setShowPropertySheet(boolean)
* enableAddMode(ISystemAddFileListener)
* setMultipleSelectionMode(boolean)
* setSelectionValidator(IValidatorRemoteSelection)
* * Call these methods to configure the text on the dialog *
** After running, call these methods to get the output: *
* * @see com.ibm.etools.systems.files.ui.actions.SystemSelectRemoteFileAction * @see com.ibm.etools.systems.files.ui.actions.SystemSelectRemoteFolderAction
Field Summary | |
---|---|
static String |
copyright
|
static boolean |
FILE_MODE
|
static boolean |
FOLDER_MODE
|
protected SystemSelectRemoteFileOrFolderForm |
form
|
protected SystemConnection |
outputConnection
|
Constructor Summary | |
---|---|
SystemSelectRemoteFileOrFolderDialog(Shell shell,
boolean fileMode)
Constructor * * @param shell The shell to hang the dialog off of * @param fileMode True if selecting files, false if selecting folders * |
|
SystemSelectRemoteFileOrFolderDialog(Shell shell,
String title,
boolean fileMode)
Constructor when you want to supply your own title |
Method Summary | |
---|---|
void |
addViewerFilter(ViewerFilter filter)
Add viewer filter |
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 |
enableAddMode(ISystemAddFileListener caller)
Enable Add mode. |
void |
enableAddMode(ISystemAddFileListener caller,
String addLabel,
String addToolTipText)
Overloaded method that allows setting the label and tooltip text of the Add button |
protected SystemSelectRemoteFileOrFolderForm |
getForm(boolean fileMode)
Private method |
protected Control |
getInitialFocusControl()
Private method |
boolean |
getMultipleSelectionMode()
Return the multiple selection mode as set by setMultipleSelectionMode(boolean) |
SystemConnection |
getSelectedConnection()
Return selected connection |
Object |
getSelectedObject()
Return selected file or folder |
Object[] |
getSelectedObjects()
Return all selected objects. |
SystemViewForm |
getSystemViewForm()
Return the embedded System Tree object |
protected boolean |
processAdd()
Private method |
protected boolean |
processDetails(boolean hideMode)
Private method |
protected boolean |
processOK()
Private method |
void |
setAllowFolderSelection(boolean allow)
Sets whether to allow folder selection. |
void |
setAllowForMultipleParents(boolean flag)
indicate whether selections from different parents are allowed |
void |
setAutoExpandDepth(int depth)
Specify the zero-based auto-expand level for the tree. |
void |
setDefaultConnection(SystemConnection conn)
Set the connection to default the selection to |
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 * * This must be called BEFORE setRootFolder! |
void |
setMessage(String message)
Set the message shown at the top of the form |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
void |
setPageComplete(boolean complete)
Call this to disable the Apply button if the input is not complete or not valid. |
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(IRemoteFile rootFolder)
Set the root folder from which to start listing folders |
void |
setRootFolder(SystemConnection connection,
String folderAbsolutePath)
Set the root folder from which to start listing folders or files |
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 |
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 |
setSystemConnection(SystemConnection conn)
Set the system connection to restrict the user to selecting files or folders from |
void |
setSystemTypes(String[] systemTypes)
Restrict to certain system types * @param systemTypes the system types to restrict what connections are shown and what types of connections * the user can create * @see com.ibm.etools.systems.core.ISystemTypes |
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 boolean FILE_MODE
public static final boolean FOLDER_MODE
protected SystemSelectRemoteFileOrFolderForm form
protected SystemConnection outputConnection
Constructor Detail |
public SystemSelectRemoteFileOrFolderDialog(Shell shell, boolean fileMode)
public SystemSelectRemoteFileOrFolderDialog(Shell shell, String title, boolean fileMode)
Method Detail |
public void setAllowForMultipleParents(boolean flag)
public void setSystemConnection(SystemConnection conn)
public void setDefaultConnection(SystemConnection conn)
public void setSystemTypes(String[] systemTypes)
public void setShowNewConnectionPrompt(boolean show)
public void setMessage(String message)
setMessage
in interface ISystemMessageLine
setMessage
in class SystemPromptDialog
public void setSelectionTreeToolTipText(String tip)
public void setAutoExpandDepth(int depth)
public void setRootFolder(SystemConnection connection, String folderAbsolutePath)
public void setRootFolder(IRemoteFile rootFolder)
* This call effectively transforms the select dialog by: *
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 enableAddMode(ISystemAddFileListener caller, 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. *
* @param show True if show the property sheet within the dialog * @param initialState 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 turn on multiple selection mode, you must use the getSelectedObjects() * method to retrieve the list of selected objects. *
* 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 * files, you also want to allow the user to select a folder, with the meaning * being that all files within the folder are implicitly selected. * * @see #getSelectedObjects()
public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
public Object getSelectedObject()
public Object[] getSelectedObjects()
public SystemConnection getSelectedConnection()
public boolean getMultipleSelectionMode()
public SystemViewForm getSystemViewForm()
protected Control getInitialFocusControl()
getInitialFocusControl
in class SystemPromptDialog
protected Control createInner(Composite parent)
createInner
in class SystemPromptDialog
protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
protected ISystemMessageLine createMessageLine(Composite c)
createMessageLine
in class SystemPromptDialog
protected boolean processOK()
* Called when user presses OK button. * Return true to close dialog. * Return false to not close dialog.
processOK
in class SystemPromptDialog
protected boolean processAdd()
* Called when user presses Add button.
processAdd
in class SystemPromptDialog
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 * * @param 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. * * @return true if the details state toggle was successful, false if it failed.
processDetails
in class SystemPromptDialog
hideMode
- the current state of the details toggle, prior to this request. If you return true from
this method, this state and the button text will be toggled.
public void setPageComplete(boolean complete)
SystemPromptDialog
setPageComplete
in class SystemPromptDialog
public boolean close()
close
in class SystemPromptDialog
public void addViewerFilter(ViewerFilter filter)
public void setAllowFolderSelection(boolean allow)
true
. This call only makes sense if the dialog is in file selection mode.
* @param allow true
to allow folder selection, false
otherwise.
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |