|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.rse.ui.actions.SystemBaseAction
org.eclipse.rse.ui.actions.SystemBaseDialogAction
org.eclipse.rse.files.ui.actions.SystemSelectRemoteFileAction
The action for allowing the user to select a remote file.
To configure, call these methods:
setShowNewConnectionPrompt(boolean)
or #setDefaultConnection(SystemConnection)
setSystemType(String) or setSystemTypes(String[])
setRootFolder(IHost, String) or setRootFolder(IRemoteFile) or setPreSelection(IRemoteFile)
setFileTypes(String[]) or setFileTypes(String)
setAutoExpandDepth(int)
setShowPropertySheet(boolean) or setShowPropertySheet(boolean,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:
| Field Summary |
|---|
| Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction |
|---|
cancelled, dlgHelpId, needsProgressMonitor, needsProgressMonitorSet, processAll, value |
| Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseAction |
|---|
allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor |
| Fields inherited from interface org.eclipse.jface.action.IAction |
|---|
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
|---|---|
SystemSelectRemoteFileAction(Shell shell)
Constructor that uses default action label and tooltip |
|
SystemSelectRemoteFileAction(Shell shell,
String label,
String tooltip)
Constructor when you have your own action label and tooltip |
|
| Method Summary | |
|---|---|
void |
addViewerFilter(ViewerFilter filter)
Add viewer filter. |
protected Dialog |
createDialog(Shell shell)
Called by eclipse when user selects this action |
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 Object |
getDialogValue(Dialog dlg)
Required by parent. |
IHost |
getSelectedConnection()
Return selected connection |
IRemoteFile |
getSelectedFile()
Retrieve selected file object. |
IRemoteFile[] |
getSelectedFiles()
Retrieve selected file objects. |
Object[] |
getSelectedObjects()
Return all selected objects. |
void |
setAllowFolderSelection(boolean allow)
Sets whether to allow folder selection. |
void |
setAutoExpandDepth(int depth)
Specify the zero-based auto-expand level for the tree. |
void |
setDefaultConnection(IHost conn)
Set the connection to default the selection to |
void |
setDialogTitle(String title)
Set the title for the dialog. |
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 |
setHost(IHost conn)
Set the system connection to restrict the user to seeing in the tree. |
void |
setMessage(String message)
Set the message shown at the top of the form |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
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 files. |
void |
setRootFolder(IRemoteFile rootFolder)
Set the root folder from which to start listing 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 |
setSystemType(String systemType)
Convenience method to restrict to a single system type. |
void |
setSystemTypes(String[] systemTypes)
Set the system types to restrict what connections the user sees, and what types of connections they can create. |
| Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction |
|---|
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasCancelled, wasNeedsProgressMonitorSet |
| Methods inherited from class org.eclipse.jface.action.AbstractAction |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.ui.actions.ISystemAction |
|---|
allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelection, setSelectionSensitive, setShell, setViewer |
| Methods inherited from interface org.eclipse.jface.action.IAction |
|---|
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionChangedListener |
|---|
selectionChanged |
| Constructor Detail |
public SystemSelectRemoteFileAction(Shell shell)
shell - The shell to hang the dialog off of
public SystemSelectRemoteFileAction(Shell shell,
String label,
String tooltip)
shell - The shell to hang the dialog off oflabel - tooltip - | Method Detail |
public void setHost(IHost conn)
setHost in class SystemBaseActionsetRootFolder(IHost, String)public void setDefaultConnection(IHost conn)
public void setSystemTypes(String[] systemTypes)
systemTypes - An array of system type namesIRSESystemTypepublic void setSystemType(String systemType)
systemType - The name of the system type to restrict toIRSESystemTypepublic void setShowNewConnectionPrompt(boolean show)
public void setAutoExpandDepth(int depth)
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")public void setRootFolder(IRemoteFile rootFolder)
rootFolder - The IRemoteFile object representing the remote folder to start the list frompublic void setPreSelection(IRemoteFile selection)
public void setFileTypes(String[] fileTypes)
public void setFileTypes(String fileTypes)
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)
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 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.
getSelectedObjects()public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
public void setDialogTitle(String title)
public void setMessage(String message)
public void setSelectionTreeToolTipText(String tip)
public IRemoteFile getSelectedFile()
public IRemoteFile[] getSelectedFiles()
public Object[] getSelectedObjects()
setMultipleSelectionMode(boolean)public IHost getSelectedConnection()
protected Dialog createDialog(Shell shell)
createDialog in class SystemBaseDialogActionSystemBaseDialogAction.run()protected Object getDialogValue(Dialog dlg)
getDialogValue in class SystemBaseDialogActiondlg - The dialog object, after it has returned from open.public void addViewerFilter(ViewerFilter filter)
filter - a viewer filter.public void setAllowFolderSelection(boolean allow)
true.
allow - true to allow folder selection, false otherwise.
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||