RSE
Release 1.0

org.eclipse.rse.ui.view
Class SystemResourceSelectionForm

java.lang.Object
  extended byorg.eclipse.rse.ui.view.SystemResourceSelectionForm
All Implemented Interfaces:
ISelectionChangedListener

public class SystemResourceSelectionForm
extends Object
implements ISelectionChangedListener


Field Summary
protected  SystemPropertySheetForm _ps
           
protected  String _verbage
           
protected  Object caller
           
protected  boolean callerInstanceOfSystemPromptDialog
           
protected  boolean callerInstanceOfWizardPage
           
protected  IHost outputConnection
           
protected  Object[] outputObjects
           
protected  Object previousSelection
           
protected static int PROMPT_WIDTH
           
protected  Label verbageLabel
           
 
Constructor Summary
SystemResourceSelectionForm(Shell shell, Composite parent, Object caller, SystemResourceSelectionInputProvider inputProvider, String verbage, boolean multipleSelection, ISystemMessageLine msgLine)
           
 
Method Summary
 void applyViewerFilter(SystemActionViewerFilter filter)
           
protected  void clearErrorMessage()
           
 void connectionChanged(IHost connection)
           
 void createControls(Composite parent)
           
protected  ISystemViewElementAdapter getAdapter(Object selection)
           
protected  Object getFirstSelection(ISelection selection)
          Return first item currently selected.
 Control getInitialFocusControl()
           
 Object[] getOutputObjects()
           
protected  ISystemRemoteElementAdapter getRemoteAdapter(Object selection)
           
protected  ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)
           
 IHost getSelectedConnection()
          Return selected connection
 Object getSelectedObject()
          Return first selected object
 Object[] getSelectedObjects()
          Return all selected objects.
protected  Object[] getSelections(ISelection selection)
          Return all items currently selected.
 boolean isPageComplete()
          This method can be called by the dialog or wizard page host, to decide whether to enable or disable the next, final or ok buttons.
 void selectionChanged(SelectionChangedEvent e)
          User selected something in the _systemViewForm.
protected  void setErrorMessage(String msg)
           
protected  void setErrorMessage(SystemMessage msg)
           
 void setMessage(String message)
          Set the message shown as the text at the top of the form.
 void setMessageLine(ISystemMessageLine msgLine)
           
 void setPageComplete()
          Inform caller of page-complete status of this form
protected  void setPathText(String text)
           
 boolean setPreSelection(Object selection)
           
 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 setShowPropertySheet(boolean show)
          Show the property sheet on the right hand side, to show the properties of the selected object.
 void setVerbage(String verbage)
           
 boolean toggleShowPropertySheet(Shell shell, Control contents)
          Show or hide the property sheet.
 boolean verify()
          Completes processing of the wizard page or dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROMPT_WIDTH

protected static final int PROMPT_WIDTH
See Also:
Constant Field Values

_ps

protected SystemPropertySheetForm _ps

previousSelection

protected Object previousSelection

caller

protected Object caller

callerInstanceOfWizardPage

protected boolean callerInstanceOfWizardPage

callerInstanceOfSystemPromptDialog

protected boolean callerInstanceOfSystemPromptDialog

_verbage

protected String _verbage

verbageLabel

protected Label verbageLabel

outputConnection

protected IHost outputConnection

outputObjects

protected Object[] outputObjects
Constructor Detail

SystemResourceSelectionForm

public SystemResourceSelectionForm(Shell shell,
                                   Composite parent,
                                   Object caller,
                                   SystemResourceSelectionInputProvider inputProvider,
                                   String verbage,
                                   boolean multipleSelection,
                                   ISystemMessageLine msgLine)
Method Detail

setMessageLine

public void setMessageLine(ISystemMessageLine msgLine)

getSelectedObject

public Object getSelectedObject()
Return first selected object


getSelectedObjects

public Object[] getSelectedObjects()
Return all selected objects.

See Also:
#setMultipleSelectionMode(boolean)

createControls

public void createControls(Composite parent)

getInitialFocusControl

public Control getInitialFocusControl()

applyViewerFilter

public void applyViewerFilter(SystemActionViewerFilter filter)

verify

public boolean verify()
Completes processing of the wizard page or dialog. If this method returns true, the wizard/dialog will close; otherwise, it will stay active.

Returns:
true if no errors

getAdapter

protected ISystemViewElementAdapter getAdapter(Object selection)

getRemoteAdapter

protected ISystemRemoteElementAdapter getRemoteAdapter(Object selection)

getRemoteAdapters

protected ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)

connectionChanged

public void connectionChanged(IHost connection)

setVerbage

public void setVerbage(String verbage)

setPreSelection

public boolean setPreSelection(Object selection)

setPathText

protected void setPathText(String text)

getOutputObjects

public Object[] getOutputObjects()

getSelectedConnection

public IHost getSelectedConnection()
Return selected connection


getFirstSelection

protected Object getFirstSelection(ISelection selection)
Return first item currently selected.


getSelections

protected Object[] getSelections(ISelection selection)
Return all items currently selected.


toggleShowPropertySheet

public boolean toggleShowPropertySheet(Shell shell,
                                       Control contents)
Show or hide the property sheet. This is called after the contents are created when the user toggles the Details button.

Parameters:
shell - Use getShell() in your dialog or wizard page
contents - Use getContents() in your dialog or wizard page
Returns:
new state -> true if showing, false if hiding

selectionChanged

public void selectionChanged(SelectionChangedEvent e)
User selected something in the _systemViewForm.

Specified by:
selectionChanged in interface ISelectionChangedListener

isPageComplete

public boolean isPageComplete()
This method can be called by the dialog or wizard page host, to decide whether to enable or disable the next, final or ok buttons. It returns true if the minimal information is available and is correct.


setPageComplete

public void setPageComplete()
Inform caller of page-complete status of this form


setShowPropertySheet

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

Default is false


setSelectionValidator

public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
Specify a validator to use when the user selects a remote file or folder. This allows you to decide if OK should be enabled or not for that remote file or folder.


clearErrorMessage

protected void clearErrorMessage()

setErrorMessage

protected void setErrorMessage(String msg)

setErrorMessage

protected void setErrorMessage(SystemMessage msg)

setMessage

public void setMessage(String message)
Set the message shown as the text at the top of the form. Eg, "Select a file"


setSelectionTreeToolTipText

public void setSelectionTreeToolTipText(String tip)
Set the tooltip text for the remote systems tree from which an item is selected.


RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.