|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.rse.ui.dialogs.SystemPromptDialog
org.eclipse.rse.ui.dialogs.SystemSelectConnectionDialog
Dialog for allowing users to select an existing connection, or optionally create a new one. There are a number of methods to configure the dialog so only connections of a particular system type, or containing subsystems from a particular subsystem factory or class of subsystem factories, are shown.
Call these methods to configure the functionality of the dialog
or #setDefaultConnection(SystemConnection)
setShowNewConnectionPrompt(boolean)
setSystemTypes(String[])
#setAutoExpandDepth(int)
#setRootFolder(IHost, 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
SystemPromptDialog.setMessage(String)
#setSelectionTreeToolTipText(String)
After running, call these methods to get the output:
| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.jface.window.Window |
|---|
Window.IExceptionHandler |
| Field Summary | |
|---|---|
static boolean |
FILE_MODE
|
static boolean |
FOLDER_MODE
|
| Fields inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
| Fields inherited from class org.eclipse.jface.window.Window |
|---|
CANCEL, OK |
| Fields inherited from interface org.eclipse.jface.dialogs.IDialogConstants |
|---|
ABORT_ID, ABORT_LABEL, BACK_ID, BACK_LABEL, BUTTON_BAR_HEIGHT, BUTTON_HEIGHT, BUTTON_MARGIN, BUTTON_WIDTH, CANCEL_ID, CANCEL_LABEL, CLIENT_ID, CLOSE_ID, CLOSE_LABEL, DESELECT_ALL_ID, ENTRY_FIELD_WIDTH, FINISH_ID, FINISH_LABEL, HELP_ID, HELP_LABEL, HIDE_DETAILS_LABEL, HORIZONTAL_MARGIN, HORIZONTAL_SPACING, IGNORE_ID, IGNORE_LABEL, INDENT, INTERNAL_ID, LEFT_MARGIN, MINIMUM_MESSAGE_AREA_WIDTH, NEXT_ID, NEXT_LABEL, NO_ID, NO_LABEL, NO_TO_ALL_ID, NO_TO_ALL_LABEL, OK_ID, OK_LABEL, OPEN_ID, OPEN_LABEL, PROCEED_ID, PROCEED_LABEL, RETRY_ID, RETRY_LABEL, SELECT_ALL_ID, SELECT_TYPES_ID, SHOW_DETAILS_LABEL, SKIP_ID, SKIP_LABEL, SMALL_INDENT, STOP_ID, STOP_LABEL, VERTICAL_MARGIN, VERTICAL_SPACING, YES_ID, YES_LABEL, YES_TO_ALL_ID, YES_TO_ALL_LABEL |
| Constructor Summary | |
|---|---|
SystemSelectConnectionDialog(Shell shell)
Constructor |
|
SystemSelectConnectionDialog(Shell shell,
String title)
Constructor when you want to supply your own title. |
|
| Method Summary | |
|---|---|
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. |
protected SystemSelectConnectionForm |
getForm(Shell shell)
Private method. |
protected Control |
getInitialFocusControl()
Private method. |
boolean |
getMultipleSelectionMode()
Return the multiple selection mode as set by setMultipleSelectionMode(boolean) |
IHost |
getSelectedConnection()
Return selected connection |
IHost[] |
getSelectedConnections()
Return selected connections in multiple selection mode |
Object |
getSelectedObject()
Return selected file or folder |
Object[] |
getSelectedObjects()
Return all selected objects. |
protected boolean |
processDetails(boolean hideMode)
Private method. |
protected boolean |
processOK()
Private method. |
void |
setDefaultConnection(IHost conn)
Set the connection to default the selection to |
void |
setInstructionLabel(String message)
Set the instruction label shown at the top of the dialog |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
void |
setPageComplete(boolean complete)
The callback method. |
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)
Restrict to a certain system type |
void |
setSystemTypes(String[] systemTypes)
Restrict to certain system types |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean FILE_MODE
public static final boolean FOLDER_MODE
| Constructor Detail |
public SystemSelectConnectionDialog(Shell shell)
shell - The shell to hang the dialog off of
public SystemSelectConnectionDialog(Shell shell,
String title)
shell - The shell to hang the dialog off oftitle - The title to give the dialog| Method Detail |
public void setDefaultConnection(IHost conn)
public void setSystemTypes(String[] systemTypes)
systemTypes - the system types to restrict what connections are shown and what types of connections
the user can createIRSESystemTypepublic void setSystemType(String systemType)
systemType - the system type to restrict what connections are shown and what types of connections
the user can createIRSESystemTypepublic void setShowNewConnectionPrompt(boolean show)
public void setInstructionLabel(String message)
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.
Default is true, false
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 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 Object getSelectedObject()
public Object[] getSelectedObjects()
setMultipleSelectionMode(boolean)public IHost getSelectedConnection()
public IHost[] getSelectedConnections()
public boolean getMultipleSelectionMode()
protected Control getInitialFocusControl()
getInitialFocusControl in class SystemPromptDialogSystemPromptDialog.getInitialFocusControl()protected Control createInner(Composite parent)
createInner in class SystemPromptDialogSystemPromptDialog.createInner(Composite)protected SystemSelectConnectionForm getForm(Shell shell)
protected ISystemMessageLine createMessageLine(Composite c)
createMessageLine in class SystemPromptDialogprotected boolean processOK()
Called when user presses OK button. Return true to close dialog. Return false to not close dialog.
processOK in class SystemPromptDialogprotected 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
processDetails in class SystemPromptDialoghideMode - 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 boolean close()
close in class SystemPromptDialogpublic void setPageComplete(boolean complete)
setPageComplete in interface ISystemPageCompleteListenersetPageComplete in class SystemPromptDialog{@link SystemBaseForm#addPageCompleteListener(ISystemPageCompleteListener)}
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||