Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.dialogs
Class SystemSelectConnectionDialog

java.lang.Object
  extended byorg.eclipse.jface.dialogs.Dialog
      extended bycom.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
          extended bycom.ibm.etools.systems.core.ui.dialogs.SystemSelectConnectionDialog
All Implemented Interfaces:
ISystemMessageLine, ISystemPageCompleteListener, ISystemPromptDialog, Runnable

public class SystemSelectConnectionDialog
extends SystemPromptDialog
implements ISystemPageCompleteListener

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 *

*

* 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

See Also:
Serialized Form

Field Summary
static String copyright
           
static boolean FILE_MODE
           
static boolean FOLDER_MODE
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
activeRunningOperations, ADD_BUTTON_NO, ADD_BUTTON_YES, ADD_ID, addButton, arrowCursor, BROWSE_BUTTON_NO, BROWSE_BUTTON_YES, BROWSE_ID, browseButton, buttonsComposite, cancelButton, cancelListener, DETAILS_BUTTON_NO, DETAILS_BUTTON_YES, DETAILS_ID, detailsButton, detailsButtonHideMode, detailsHideLabel, detailsShowLabel, dialogAreaComposite, dialogMnemonics, fMessageLine, helpId, horizontalSpacing, initialAddButtonEnabledState, initialDetailsButtonEnabledState, initialOKButtonEnabledState, inputObject, labelAdd, labelBrowse, labelCancel, labelDetailsHide, labelDetailsShow, labelOk, labelTest, marginHeight, marginWidth, minHeight, minWidth, needsProgressMonitor, okButton, okPressed, operationCancelableState, outputObject, outputObjectValidator, overallShell, pack, parentComposite, pendingErrorMessage, pendingMessage, progressMonitorPart, showAddButton, showBrowseButton, showDetailsButton, showOkButton, showTestButton, TEST_BUTTON_NO, TEST_BUTTON_YES, TEST_ID, testButton, tipAdd, tipBrowse, tipCancel, tipDetailsHide, tipDetailsShow, tipOk, tipTest, title, titleImage, verticalSpacing, waitCursor, windowClosingDialog
 
Constructor Summary
SystemSelectConnectionDialog(Shell shell)
          Constructor * * @param shell The shell to hang the dialog off of *
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)
 SystemConnection getSelectedConnection()
          Return selected connection
 SystemConnection[] 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(SystemConnection 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 * @param systemType the system type to restrict what connections are shown and what types of connections * the user can create * @see com.ibm.etools.systems.core.ISystemTypes
 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 com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
aboutToStart, addFillerLine, addGrowableFillerLine, addSeparatorLine, adjustButtonWidth, applyMnemonics, buttonPressed, clearErrorMessage, clearMessage, configureShell, createButtonBar, createButtonsForButtonBar, createContents, createControl, createDialogArea, createWizardClosingDialog, dispose, enableAddButton, enableBrowseButton, enableCancelButton, enableDetailsButton, enableOkButton, enableTestButton, getAddButton, getBrowseButton, getCancelOrCloseButton, getControl, getDescription, getDetailsButton, getDialogMnemonics, getErrorMessage, getHelpContextId, getImage, getInputObject, getMessage, getMessageLine, getOkButton, getOutputObject, getOutputObjectValidator, getProgressMonitor, getSystemErrorMessage, getTestButton, getTitle, handleEvent, hardClose, okToClose, pack, performHelp, processAdd, processBrowse, processCancel, processTest, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, restoreEnableState, restoreUIState, run, run, saveEnableStateAndSet, saveUIState, setAddButtonLabel, setAddButtonToolTipText, setBrowseButtonLabel, setBrowseButtonToolTipText, setBusyCursor, setCancelButtonLabel, setCancelButtonToolTipText, setControl, setDescription, setDetailsButtonLabel, setDetailsButtonToolTipText, setDisplayCursor, setDisplayCursor, setErrorMessage, setErrorMessage, setErrorMessage, setHelp, setHelp, setImageDescriptor, setInitialOKButtonEnabledState, setInputObject, setMessage, setMessage, setMinimumSize, setNeedsProgressMonitor, setOkButtonLabel, setOkButtonToolTipText, setOutputObject, setOutputObjectValidator, setShowAddButton, setShowBrowseButton, setShowDetailsButton, setShowOkButton, setShowTestButton, setTestButtonLabel, setTestButtonToolTipText, setTitle, setVisible, wasCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

FILE_MODE

public static final boolean FILE_MODE
See Also:
Constant Field Values

FOLDER_MODE

public static final boolean FOLDER_MODE
See Also:
Constant Field Values
Constructor Detail

SystemSelectConnectionDialog

public SystemSelectConnectionDialog(Shell shell)
Constructor * * @param shell The shell to hang the dialog off of *


SystemSelectConnectionDialog

public SystemSelectConnectionDialog(Shell shell,
                                    String title)
Constructor when you want to supply your own title. * * @param shell The shell to hang the dialog off of * @param title The title to give the dialog

Method Detail

setDefaultConnection

public void setDefaultConnection(SystemConnection conn)
Set the connection to default the selection to


setSystemTypes

public 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


setSystemType

public void setSystemType(String systemType)
Restrict to a certain system type * @param systemType the system type to restrict what connections are shown and what types of connections * the user can create * @see com.ibm.etools.systems.core.ISystemTypes


setShowNewConnectionPrompt

public void setShowNewConnectionPrompt(boolean show)
Set to true if a "New Connection..." special connection is to be shown for creating new connections


setInstructionLabel

public void setInstructionLabel(String message)
Set the instruction label shown at the top of the dialog


setShowPropertySheet

public void setShowPropertySheet(boolean show)
Show the property sheet on the right hand side, to show the properties of the * selected object. *

* This overload always shows the property sheet *

* Default is false


setShowPropertySheet

public void setShowPropertySheet(boolean show,
                                 boolean initialState)
Show the property sheet on the right hand side, to show the properties of the * selected object. *

* This overload shows a Details>>> button so the user can decide if they want to see the * property sheet. *

* Default is true, false *

* @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.


setMultipleSelectionMode

public void setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. Default is single selection mode *

* 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()


getSelectedObject

public Object getSelectedObject()
Return selected file or folder


getSelectedObjects

public Object[] getSelectedObjects()
Return all selected objects. This method will return an array of one * unless you have called setMultipleSelectionMode(true)! * @see #setMultipleSelectionMode(boolean)


getSelectedConnection

public SystemConnection getSelectedConnection()
Return selected connection


getSelectedConnections

public SystemConnection[] getSelectedConnections()
Return selected connections in multiple selection mode


getMultipleSelectionMode

public boolean getMultipleSelectionMode()
Return the multiple selection mode as set by setMultipleSelectionMode(boolean)


getInitialFocusControl

protected Control getInitialFocusControl()
Private method. * @see SystemPromptDialog#getInitialFocusControl()

Specified by:
getInitialFocusControl in class SystemPromptDialog

createInner

protected Control createInner(Composite parent)
Private method. * @see SystemPromptDialog#createInner(Composite)

Specified by:
createInner in class SystemPromptDialog

getForm

protected SystemSelectConnectionForm getForm(Shell shell)
Private method. * Get the contents.


createMessageLine

protected ISystemMessageLine createMessageLine(Composite c)
Create message line. Intercept so we can set msg line of form.

Overrides:
createMessageLine in class SystemPromptDialog

processOK

protected boolean processOK()
Private method. *

* Called when user presses OK button. * Return true to close dialog. * Return false to not close dialog.

Overrides:
processOK in class SystemPromptDialog

processDetails

protected boolean processDetails(boolean hideMode)
Private method. *

* 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.

Overrides:
processDetails in class SystemPromptDialog
Parameters:
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.
Returns:
true if the details state toggle was successful, false if it failed.

close

public boolean close()
We have to override close to ensure that we reset the form to null

Overrides:
close in class SystemPromptDialog

setPageComplete

public void setPageComplete(boolean complete)
The callback method. * This is called whenever setPageComplete is called by the form code. * @see SystemBaseForm#addPageCompleteListener(ISystemPageCompleteListener)

Specified by:
setPageComplete in interface ISystemPageCompleteListener
Overrides:
setPageComplete in class SystemPromptDialog

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.