RSE
Release 1.0

org.eclipse.rse.ui.view
Class SystemViewConnectionSelectionInputProvider

java.lang.Object
  extended byorg.eclipse.rse.ui.view.SystemAbstractAPIProvider
      extended byorg.eclipse.rse.ui.view.SystemViewConnectionSelectionInputProvider
All Implemented Interfaces:
IAdaptable, ISystemViewInputProvider

public class SystemViewConnectionSelectionInputProvider
extends SystemAbstractAPIProvider

This input provider for the System View is used when we want to merely present a list of existing connections for the user to select from, and optionally include the New Connection prompting connection.
Used in the SystemSelectConnectionForm class.


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.view.SystemAbstractAPIProvider
canceledObject, emptyList, errorObject, msgList, nullObject, shell, sr, viewer
 
Constructor Summary
SystemViewConnectionSelectionInputProvider()
          Constructor
 
Method Summary
 Object[] getConnectionChildren(IHost selectedConnection)
          This method is called by the connection adapter when the user expands a connection.
 boolean getShowNewConnectionPrompt()
          Query whether the New Connection prompt is to be shown or not.
 String[] getSystemTypes()
          Return the system types we are restricted by
 Object[] getSystemViewRoots()
           
 boolean hasConnectionChildren(IHost selectedConnection)
          This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection.
 boolean hasSystemViewRoots()
           
 void setShowNewConnectionPrompt(boolean show)
          Specify if the New Connection prompt is to be shown.
 void setSystemTypes(String[] systemTypes)
          Set the system types to restrict by
 boolean showingConnections()
          Return true if we are listing connections or not, so we know whether we are interested in connection-add events
 
Methods inherited from class org.eclipse.rse.ui.view.SystemAbstractAPIProvider
checkForNull, getAdapter, getAdapter, getCancelledMessageObject, getFailedMessageObject, getRemoteAdapter, getShell, getViewer, setShell, setViewer, showActionBar, showActions, showButtonBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemViewConnectionSelectionInputProvider

public SystemViewConnectionSelectionInputProvider()
Constructor

Method Detail

setShowNewConnectionPrompt

public void setShowNewConnectionPrompt(boolean show)
Specify if the New Connection prompt is to be shown. Default is true.


getShowNewConnectionPrompt

public boolean getShowNewConnectionPrompt()
Query whether the New Connection prompt is to be shown or not.


setSystemTypes

public void setSystemTypes(String[] systemTypes)
Set the system types to restrict by


getSystemTypes

public String[] getSystemTypes()
Return the system types we are restricted by


getSystemViewRoots

public Object[] getSystemViewRoots()
Returns:
the children objects to consistute the root elements in the system view tree
See Also:
ISystemViewInputProvider.getSystemViewRoots()

hasSystemViewRoots

public boolean hasSystemViewRoots()
Returns:
true if ISystemViewInputProvider.getSystemViewRoots() will return a non-empty list
See Also:
ISystemViewInputProvider.hasSystemViewRoots()

showingConnections

public boolean showingConnections()
Description copied from class: SystemAbstractAPIProvider
Return true if we are listing connections or not, so we know whether we are interested in connection-add events

Specified by:
showingConnections in interface ISystemViewInputProvider
Overrides:
showingConnections in class SystemAbstractAPIProvider
See Also:
ISystemViewInputProvider.showingConnections()

getConnectionChildren

public Object[] getConnectionChildren(IHost selectedConnection)
Description copied from interface: ISystemViewInputProvider
This method is called by the connection adapter when the user expands a connection. This method must return the child objects to show for that connection.

Parameters:
selectedConnection - the connection undergoing expansion
Returns:
the list of objects under the connection
See Also:
ISystemViewInputProvider.getConnectionChildren(org.eclipse.rse.core.model.IHost)

hasConnectionChildren

public boolean hasConnectionChildren(IHost selectedConnection)
Description copied from interface: ISystemViewInputProvider
This method is called by the connection adapter when deciding to show a plus-sign or not beside a connection.

Parameters:
selectedConnection - the connection being shown in the viewer
Returns:
true if this connection has children to be shown.
See Also:
ISystemViewInputProvider.hasConnectionChildren(org.eclipse.rse.core.model.IHost)

RSE
Release 1.0

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