Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.widgets
Class SystemHostCombo

java.lang.Object
  extended by 

org.eclipse.swt.widgets.Widget
      extended by 

org.eclipse.swt.widgets.Control
          extended by 

org.eclipse.swt.widgets.Scrollable
              extended by 

org.eclipse.swt.widgets.Composite
                  extended by 
org.eclipse.rse.ui.widgets.SystemHostCombo
All Implemented Interfaces:
EventListener, ISelectionProvider, ISystemResourceChangeListener, ISystemShellProvider, ISystemCombo, DisposeListener, Drawable, org.eclipse.swt.internal.SWTEventListener

public class SystemHostCombo
extends Composite
implements ISelectionProvider, ISystemCombo, ISystemResourceChangeListener, ISystemShellProvider, DisposeListener

This re-usable widget is for selecting a connection from the master list of connections. The list is subsettable by one or more system types. There is also the option of including a "New" button to the right of the connection dropdown, for the purpose of creating a new connection.

Without the New button, the composite is layed as follows:


   Connection: ______________________v  
 

With the New button, the composite is layed as follows:


   Connection: ______________v  New...
 

There are numerous ways to subset the connection list:

  • By system type, either by a single type or an array of types. Only connections of these types are listed.
  • By subsystem factory. Only connections with subsystems owned by the given subsystem factory are listed.
  • By subsystem factory category. Only connections which contain subsystems owned by subsystem factories which are defined in their xml extension point as being of the given category are listed. For a list of pre-defined categories, see ISubSystemConfigurationCategories.


Field Summary
protected   Combo connectionCombo
           
protected   Label connectionLabel
           
protected  boolean listeningForConnectionEvents
           
protected   Button newButton
           
protected  boolean showLabel
           
protected  boolean showNewButton
           
protected  boolean showQualifiedNames
           
 
Fields inherited from class org.eclipse.swt.widgets. Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets. Widget
handle
 
Constructor Summary
SystemHostCombo ( Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssConfigCategory)
          Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to.
SystemHostCombo ( Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssConfigCategory, boolean showLabel)
          Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to.
SystemHostCombo ( Composite parent, int style, IHost defaultConnection, String ssConfigId, boolean showNewButton)
          Constructor for SystemConnectionCombo when there is a subsystem factory id to restrict the list to.
SystemHostCombo ( Composite parent, int style, IRSESystemType[] systemTypes, IHost defaultConnection, boolean showNewButton)
          Constructor for SystemConnectionCombo when there is an array of system types to restrict the connection list to.
SystemHostCombo ( Composite parent, int style, IRSESystemType systemType, IHost defaultConnection, boolean showNewButton)
          Constructor for SystemConnectionCombo when there is only a single system type to restrict the connection list to.
SystemHostCombo ( Composite parent, int style, ISubSystemConfiguration ssConfig, IHost defaultConnection, boolean showNewButton)
          Constructor for SystemConnectionCombo when there is a subsystem factory to restrict the list to.
 
Method Summary
 void addModifyListener ( ModifyListener listener)
          Register a listener interested in entry field modify events
 void addNewButtonSelectionListener ( SelectionListener listener)
          Register a listener interested in when the new button is selected
protected  void addOurButtonSelectionListener ()
           
protected  void addOurConnectionSelectionListener ()
           
 void addSelectionChangedListener ( ISelectionChangedListener listener)
          Register a listener interested in an item is selected in the combo box
 void addSelectionListener ( SelectionListener listener)
          Register a listener interested in an item is selected in the combo box
 void clearSelection ()
          Deselect
 void clearTextSelection ()
          Clear the entered/selected contents of the combo box.
static  Combo createCombo ( Composite parent, boolean readonly)
          Creates a new combobox instance and sets the default layout data.
protected   Combo createConnectionCombo ( Composite parent)
          Creates a new read-only connection combobox instance and sets the default layout data, with tooltip text.
protected static  Button createPushButton ( Composite group, String label)
           
protected static  Button createPushButton ( Composite group, String label, String tooltip)
           
  Combo getCombo ()
          Return the combo box widget
  IHost[] getConnections ()
           
 int getGridColumns ()
          Return the number of grid data columns within this composite.
  IHost getHost ()
          Get the user selected SystemConnection object.
  String[] getItems ()
          Get the items in the combo field
  Button getNewButton ()
          Return the New... button widget
protected   SystemNewConnectionAction getNewConnectionAction ( Shell shell, ISelectionProvider selectionProvider)
          Overridable method.
  Label getPromptLabel ()
          Get the prompt Label widget
  ISelection getSelection ()
           
 int getSelectionIndex ()
          Get the index number of the currently selected item.
  String getText ()
          Return the text in the connection combo entry field.
protected  void init ( Composite parent, boolean showNewButton)
           
protected  void init ( Composite parent, boolean showNewButton, boolean showLabel)
           
 void listenToConnectionEvents (boolean start)
          Have the SystemConnectionCombo listen to add/delete/rename events on connections and automatically update it's list of connections
protected  boolean populateConnectionCombo ( Combo combo, IHost defaultConnection, String ssConfigCategory)
          Populates a read-only connection combobox instance with system connections which have subsystems owned by a subsystem factory of the given subsystem factory category.
protected  void populateConnectionCombo ( Combo combo, IRSESystemType[] systemTypes, IHost defaultConnection)
          Populates a read-only connection combobox instance with system connections for the given array of system types.
protected  boolean populateConnectionCombo ( Combo combo, IRSESystemType systemType, IHost defaultConnection, boolean preSelectIfNoMatch)
          Populates a read-only connection combobox instance with system connections for the given system type.
protected  boolean populateConnectionCombo ( Combo combo, IRSESystemType systemType, IHost defaultConnection, boolean preSelectIfNoMatch, boolean appendToCombo)
          Populates a read-only connection combobox instance with system connections for the given system type.
protected  boolean populateConnectionCombo ( Combo combo, ISubSystemConfiguration ssConfig, IHost defaultConnection)
          Populates a read-only connection combobox instance with system connections which have subsystems owned by the given subsystem factory.
protected  boolean populateConnectionCombo ( Combo combo, String ssConfigId, IHost defaultConnection)
          Populates a read-only connection combobox instance with system connections which have subsystems owned by a subsystem factory of the given subsystem factory id.
protected   Composite prepareComposite (int numColumns)
          Prepares this composite control and sets the default layout data.
 void refreshConnections ()
          Refresh the list of connections
 void removeModifyListener ( ModifyListener listener)
          Remove a previously set entry field listener.
 void removeNewButtonSelectionListener ( SelectionListener listener)
          Remove a previously set new button selection listener.
 void removeSelectionChangedListener ( ISelectionChangedListener listener)
          Remove a previously set combo box selection listener.
 void removeSelectionListener ( SelectionListener listener)
          Remove a previously set combo box selection listener.
 void select ( IHost connection)
          Select a connection from the dropdown
 void select (int selIdx)
          Select the combo dropdown list entry at the given index.
 void setAutoUpperCase (boolean enable)
          Set auto-uppercase.
protected  void setBusyCursor (boolean setBusy)
          Helper method.
 void setButtonToolTipText ( String tip)
          Same as setNewButtonToolTipText(String)
 void setButtonWidthHint ( Control otherWidget)
          Set button width hint, based on the width of another widget
 void setButtonWidthHint (int widthHint)
          Set button width hint
 void setConnections ( IHost[] input)
           
protected  void setConnectionToolTipText ()
           
 void setEnabled (boolean enabled)
          Disable/Enable all the child controls.
 boolean setFocus ()
          Set the focus to the directory combo field
 void setItems ( String[] items)
          Set the items in the combo field
 void setLabel ( String label)
          Set the label to use for the prompt.
 void setNewButtonFocus ()
          Set the focus to the new button
 void setNewButtonToolTipText ( String tip)
          Set the tooltip text for the new button
 void setSelection ( ISelection selection)
           
 void setSelectionIndex (int selIdx)
          Same as select(int)
 void setToolTipText ( String tip)
          Set the tooltip text for the directory combo field
 void setWidthHint (int widthHint)
          Set the width hint for this whole composite Default is 180.
protected static  String sub ( String msg, String subOld, String subNew)
          Do string variable substitution.
 void systemResourceChanged ( ISystemResourceChangeEvent event)
          This is the method in your class that will be called when a system resource changes.
 void widgetDisposed ( DisposeEvent e)
          We are going away.
 
Methods inherited from class org.eclipse.swt.widgets. Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets. Scrollable
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets. Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getData, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets. Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.model. ISystemShellProvider
getShell
 

Field Detail

connectionLabel

protected 
Label connectionLabel

connectionCombo

protected 
Combo connectionCombo

newButton

protected 
Button newButton

showNewButton

protected boolean showNewButton

showLabel

protected boolean showLabel

showQualifiedNames

protected boolean showQualifiedNames

listeningForConnectionEvents

protected boolean listeningForConnectionEvents
Constructor Detail

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
IRSESystemType systemType,
                       
IHost defaultConnection,
                       boolean showNewButton)
Constructor for SystemConnectionCombo when there is only a single system type to restrict the connection list to.

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
systemType - the system type to restrict the connection list to. Can be null or * for all.
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
IRSESystemType[] systemTypes,
                       
IHost defaultConnection,
                       boolean showNewButton)
Constructor for SystemConnectionCombo when there is an array of system types to restrict the connection list to.

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
systemTypes - the system type array to restrict the connection list to.
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
ISubSystemConfiguration ssConfig,
                       
IHost defaultConnection,
                       boolean showNewButton)
Constructor for SystemConnectionCombo when there is a subsystem factory to restrict the list to.

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
ssConfig - Only connections with subsystems owned by this factory are returned.
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
IHost defaultConnection,
                       
String ssConfigId,
                       boolean showNewButton)
Constructor for SystemConnectionCombo when there is a subsystem factory id to restrict the list to. To avoid collision with the constructor that takes a string for the system type, this one places the subystem factory Id string parameter after the defaultConnection constructor

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
ssConfigId - Only connections with subsystems owned by this configuration are returned.
showNewButton - true if a New... button is to be included in this composite

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
IHost defaultConnection,
                       boolean showNewButton,
                       
String ssConfigCategory)
Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to. To avoid collision with the constructor that takes a string for the system type, this one places the string parameter at the end.

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite
ssConfigCategory - Only connections with subsystems owned by configurations of this category are returned.

SystemHostCombo

public SystemHostCombo(
Composite parent,
                       int style,
                       
IHost defaultConnection,
                       boolean showNewButton,
                       
String ssConfigCategory,
                       boolean showLabel)
Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to. To avoid collision with the constructor that takes a string for the system type, this one places the string parameter at the end.

Parameters:
parent - Parent composite
style - SWT style flags for overall composite widget. Typically just pass SWT.NULL
defaultConnection - the system connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite
ssConfigCategory - Only connections with subsystems owned by factories of this category are returned.
showLabel - true if a 'Connection' label is to be included in this composite
Method Detail

setAutoUpperCase

public void setAutoUpperCase(boolean enable)
Set auto-uppercase. When enabled, all non-quoted values are uppercases when added to the history.

This method is part of ISystemCombo, so we must support it, but it does not apply this combo widget since the contents are read-only. Hence, it does nothing!

Specified by:
setAutoUpperCase in interface ISystemCombo

init

protected void init(
Composite parent,
                    boolean showNewButton)

init

protected void init(
Composite parent,
                    boolean showNewButton,
                    boolean showLabel)

getNewConnectionAction

protected 
SystemNewConnectionAction getNewConnectionAction(
Shell shell,
                                                           
ISelectionProvider selectionProvider)
Overridable method. Returns action to be called when New... pressed.


getHost

public 
IHost getHost()
Get the user selected SystemConnection object. Might be null if the list is empty.


getCombo

public 
Combo getCombo()
Return the combo box widget

Specified by:
getCombo in interface ISystemCombo

setWidthHint

public void setWidthHint(int widthHint)
Set the width hint for this whole composite Default is 180.

Specified by:
setWidthHint in interface ISystemCombo

setButtonWidthHint

public void setButtonWidthHint(int widthHint)
Set button width hint


setButtonWidthHint

public void setButtonWidthHint(
Control otherWidget)
Set button width hint, based on the width of another widget


getGridColumns

public int getGridColumns()
Return the number of grid data columns within this composite. Will vary depending if there is a New button or not.


getNewButton

public 
Button getNewButton()
Return the New... button widget


getPromptLabel

public 
Label getPromptLabel()
Get the prompt Label widget


setItems

public void setItems(
String[] items)
Set the items in the combo field


getItems

public 
String[] getItems()
Get the items in the combo field


getText

public 
String getText()
Return the text in the connection combo entry field. This is only of limited value. You should call getSystemConnection() instead.

Specified by:
getText in interface ISystemCombo

setEnabled

public void setEnabled(boolean enabled)
Disable/Enable all the child controls.

Specified by:
setEnabled in interface ISystemCombo
Overrides:
setEnabled in class Control

setToolTipText

public void setToolTipText(
String tip)
Set the tooltip text for the directory combo field

Specified by:
setToolTipText in interface ISystemCombo
Overrides:
setToolTipText in class Control

setNewButtonToolTipText

public void setNewButtonToolTipText(
String tip)
Set the tooltip text for the new button


setButtonToolTipText

public void setButtonToolTipText(
String tip)
Same as setNewButtonToolTipText(String)

Specified by:
setButtonToolTipText in interface ISystemCombo

setLabel

public void setLabel(
String label)
Set the label to use for the prompt.


setFocus

public boolean setFocus()
Set the focus to the directory combo field

Specified by:
setFocus in interface ISystemCombo
Overrides:
setFocus in class Composite

setNewButtonFocus

public void setNewButtonFocus()
Set the focus to the new button


select

public void select(int selIdx)
Select the combo dropdown list entry at the given index.

Specified by:
select in interface ISystemCombo

setSelectionIndex

public void setSelectionIndex(int selIdx)
Same as select(int)

Specified by:
setSelectionIndex in interface ISystemCombo

select

public void select(
IHost connection)
Select a connection from the dropdown


clearSelection

public void clearSelection()
Deselect

Specified by:
clearSelection in interface ISystemCombo

clearTextSelection

public void clearTextSelection()
Clear the entered/selected contents of the combo box. Clears only the text selection, not the list selection

Specified by:
clearTextSelection in interface ISystemCombo

getSelectionIndex

public int getSelectionIndex()
Get the index number of the currently selected item.

Specified by:
getSelectionIndex in interface ISystemCombo

addSelectionListener

public void addSelectionListener(
SelectionListener listener)
Register a listener interested in an item is selected in the combo box

Specified by:
addSelectionListener in interface ISystemCombo
See Also:
removeSelectionListener(SelectionListener)

removeSelectionListener

public void removeSelectionListener(
SelectionListener listener)
Remove a previously set combo box selection listener.

Specified by:
removeSelectionListener in interface ISystemCombo
See Also:
addSelectionListener(SelectionListener)

addNewButtonSelectionListener

public void addNewButtonSelectionListener(
SelectionListener listener)
Register a listener interested in when the new button is selected

See Also:
removeNewButtonSelectionListener(SelectionListener)

removeNewButtonSelectionListener

public void removeNewButtonSelectionListener(
SelectionListener listener)
Remove a previously set new button selection listener.

See Also:
addNewButtonSelectionListener(SelectionListener)

addModifyListener

public void addModifyListener(
ModifyListener listener)
Register a listener interested in entry field modify events

See Also:
removeModifyListener(ModifyListener)

removeModifyListener

public void removeModifyListener(
ModifyListener listener)
Remove a previously set entry field listener.

See Also:
addModifyListener(ModifyListener)

prepareComposite

protected 
Composite prepareComposite(int numColumns)
Prepares this composite control and sets the default layout data.

Parameters:
numColumns - Number of columns the new group will contain.

createConnectionCombo

protected 
Combo createConnectionCombo(
Composite parent)
Creates a new read-only connection combobox instance and sets the default layout data, with tooltip text. Assign the listener to the passed in implementer of Listener.

This fills the combination with the names of all the active connections of the given system type.

Parameters:
parent - composite to put the button into.

createCombo

public static 
Combo createCombo(
Composite parent,
                                boolean readonly)
Creates a new combobox instance and sets the default layout data.

Does NOT set the widthHint as that causes problems. Instead the combo will consume what space is available within this composite.

Parameters:
parent - composite to put the button into.

populateConnectionCombo

protected boolean populateConnectionCombo(
Combo combo,
                                          
IRSESystemType systemType,
                                          
IHost defaultConnection,
                                          boolean preSelectIfNoMatch)
Populates a read-only connection combobox instance with system connections for the given system type.

This fills the combination with the names of all the active connections of the given system type.

Parameters:
combo - composite to populate
systemType - the system type to restrict the connection list to. Pass null or * for all system types
defaultConnection - the default system connection to preselect.
preSelectIfNoMatch - true if we should preselect the first item if the given connection is not found
Returns:
true if given default connection was found and selected

populateConnectionCombo

protected boolean populateConnectionCombo(
Combo combo,
                                          
IRSESystemType systemType,
                                          
IHost defaultConnection,
                                          boolean preSelectIfNoMatch,
                                          boolean appendToCombo)
Populates a read-only connection combobox instance with system connections for the given system type.

This fills the combination with the names of all the active connections of the given system type.

Parameters:
combo - composite to populate
systemType - the system type to restrict the connection list to. Pass null for all system types
defaultConnection - the default system connection to preselect.
preSelectIfNoMatch - true if we should preselect the first item if the given connection is not found
appendToCombo - indicates whether or not to append to combo with population or replace
Returns:
true if given default connection was found and selected

populateConnectionCombo

protected void populateConnectionCombo(
Combo combo,
                                       
IRSESystemType[] systemTypes,
                                       
IHost defaultConnection)
Populates a read-only connection combobox instance with system connections for the given array of system types.

Parameters:
combo - composite to populate
systemTypes - the system types to restrict the connection list to. Pass null or * for all system types
defaultConnection - the default system connection to preselect.

populateConnectionCombo

protected boolean populateConnectionCombo(
Combo combo,
                                          
ISubSystemConfiguration ssConfig,
                                          
IHost defaultConnection)
Populates a read-only connection combobox instance with system connections which have subsystems owned by the given subsystem factory.

Parameters:
combo - composite to populate
ssConfig - the subsystem factory to restrict the connection list to.
defaultConnection - the default system connection to preselect.
Returns:
true if given default connection was found and selected

populateConnectionCombo

protected boolean populateConnectionCombo(
Combo combo,
                                          
String ssConfigId,
                                          
IHost defaultConnection)
Populates a read-only connection combobox instance with system connections which have subsystems owned by a subsystem factory of the given subsystem factory id.

Parameters:
combo - composite to populate
defaultConnection - the default system connection to preselect.
ssConfigId - the subsystem factory id to restrict the connection list by.
Returns:
true if given default connection was found and selected

populateConnectionCombo

protected boolean populateConnectionCombo(
Combo combo,
                                          
IHost defaultConnection,
                                          
String ssConfigCategory)
Populates a read-only connection combobox instance with system connections which have subsystems owned by a subsystem factory of the given subsystem factory category.

Parameters:
combo - composite to populate
defaultConnection - the default system connection to preselect.
ssConfigCategory - the subsystem factory category to restrict the connection list by.
Returns:
true if given default connection was found and selected

sub

protected static 
String sub(
String msg,
                            
String subOld,
                            
String subNew)
Do string variable substitution. Using you are replacing %1 (say) with a string

Parameters:
msg - message containing substitution variable. Eg "Connect failed with return code &1"
subOld - substitution variable. Eg "%1"
subNew - substitution data. Eg "001"
Returns:
message with all occurrences of variable substituted with data.

refreshConnections

public void refreshConnections()
Refresh the list of connections


systemResourceChanged

public void systemResourceChanged(
ISystemResourceChangeEvent event)
This is the method in your class that will be called when a system resource changes. We want to listen to connection changes.

Specified by:
systemResourceChanged in interface ISystemResourceChangeListener
See Also:
ISystemResourceChangeEvent

listenToConnectionEvents

public void listenToConnectionEvents(boolean start)
Have the SystemConnectionCombo listen to add/delete/rename events on connections and automatically update it's list of connections


widgetDisposed

public void widgetDisposed(
DisposeEvent e)
We are going away. De-Register ourselves as a listener for system resource change events

Specified by:
widgetDisposed in interface DisposeListener

addOurButtonSelectionListener

protected void addOurButtonSelectionListener()

addOurConnectionSelectionListener

protected void addOurConnectionSelectionListener()

setConnectionToolTipText

protected void setConnectionToolTipText()

createPushButton

protected static 
Button createPushButton(
Composite group,
                                         
String label)

createPushButton

protected static 
Button createPushButton(
Composite group,
                                         
String label,
                                         
String tooltip)

addSelectionChangedListener

public void addSelectionChangedListener(
ISelectionChangedListener listener)
Register a listener interested in an item is selected in the combo box

Specified by:
addSelectionChangedListener in interface ISelectionProvider
See Also:
removeSelectionChangedListener(ISelectionChangedListener)

removeSelectionChangedListener

public void removeSelectionChangedListener(
ISelectionChangedListener listener)
Remove a previously set combo box selection listener.

Specified by:
removeSelectionChangedListener in interface ISelectionProvider
See Also:
addSelectionChangedListener(ISelectionChangedListener)

getSelection

public 
ISelection getSelection()
Specified by:
getSelection in interface ISelectionProvider

setSelection

public void setSelection(
ISelection selection)
Specified by:
setSelection in interface ISelectionProvider

getConnections

public 
IHost[] getConnections()

setConnections

public void setConnections(
IHost[] input)

setBusyCursor

protected void setBusyCursor(boolean setBusy)
Helper method.
Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).


RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire