Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.actions
Class SystemSelectConnectionAction

java.lang.Object
  extended byAction
      extended bycom.ibm.etools.systems.core.ui.actions.SystemBaseAction
          extended bycom.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
              extended bycom.ibm.etools.systems.core.ui.actions.SystemSelectConnectionAction
All Implemented Interfaces:
ISystemAction, ISystemDialogAction

public class SystemSelectConnectionAction
extends SystemBaseDialogAction

Use this action to put up a dialog allowing users to select one or more connections.

See Also:
Serialized Form

Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
cancelled, dlgHelpId, needsProgressMonitor, needsProgressMonitorSet, processAll, value
 
Fields inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
 
Constructor Summary
SystemSelectConnectionAction(Shell shell)
          Constructor
 
Method Summary
protected  Dialog createDialog(Shell shell)
          If you decide to use the supplied run method as is, then you must override this method to create and return the dialog that is displayed by the default run method implementation.
protected  Object getDialogValue(Dialog dlg)
          If you decide to use the supplied run method as is, then you must override this method to retrieve the data from the dialog.
 SystemConnection getSystemConnection()
          Return the selected connection in single select mode
 void setDefaultConnection(SystemConnection conn)
          Set the connection to default the selection to
 void setInstructionLabel(String message)
          Set the label text shown at the top of the dialog
 void setMultipleSelectionMode(boolean multiple)
          Set multiple selection mode.
 void setShowNewConnectionPrompt(boolean show)
          Set to true/false 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 com.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasCancelled, wasNeedsProgressMonitorSet
 
Methods inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
allowOnMultipleSelection, checkObjectType, getAdapter, getContextMenuGroup, getCurrentTreeView, getDescription, getFirstSelection, getHelpContextId, getLabel, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getString, getStringOrNull, getToolTip, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setSystemConnection, setTracing, setTracing, setViewer, updateSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.core.ui.actions.ISystemAction
allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelection, setSelectionSensitive, setShell, setViewer
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemSelectConnectionAction

public SystemSelectConnectionAction(Shell shell)
Constructor

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

Parameters:
systemTypes - the system types to restrict what connections are shown and what types of connections the user can create
See Also:
ISystemTypes

setSystemType

public void setSystemType(String systemType)
Restrict to a certain system type

Parameters:
systemType - the system type to restrict what connections are shown and what types of connections the user can create
See Also:
ISystemTypes

setShowNewConnectionPrompt

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


setInstructionLabel

public void setInstructionLabel(String message)
Set the label text 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.

Parameters:
show - True if show the property sheet within the dialog
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 Also:
#getSelectedObjects()

getSystemConnection

public SystemConnection getSystemConnection()
Return the selected connection in single select mode

Overrides:
getSystemConnection in class SystemBaseAction

createDialog

protected Dialog createDialog(Shell shell)
Description copied from class: SystemBaseDialogAction
If you decide to use the supplied run method as is, then you must override this method to create and return the dialog that is displayed by the default run method implementation.

If you override actionPerformed with your own, then simply implement this to return null as it won't be used.

Specified by:
createDialog in class SystemBaseDialogAction
See Also:
SystemBaseDialogAction.run()

getDialogValue

protected Object getDialogValue(Dialog dlg)
Description copied from class: SystemBaseDialogAction
If you decide to use the supplied run method as is, then you must override this method to retrieve the data from the dialog. For SystemPromptDialog dialogs, this is simply a matter of returning dlg.getOutputObject();

This is called by the run method after the dialog returns, and wasCancelled() is false. Callers of this object can subsequently retrieve this returned value by calling getValue. If you don't need to pass a value back to the caller of this action, simply return null from this method.

Specified by:
getDialogValue in class SystemBaseDialogAction
Parameters:
dlg - The dialog object, after it has returned from open.

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.