iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.ui.widgets
Class ISeriesConnectionCombo

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended bycom.ibm.etools.systems.core.ui.widgets.SystemConnectionCombo
                      extended bycom.ibm.etools.iseries.core.ui.widgets.ISeriesConnectionCombo
All Implemented Interfaces:
DisposeListener, Drawable, EventListener, ISelectionProvider, com.ibm.etools.systems.core.ui.widgets.ISystemCombo, com.ibm.etools.systems.model.ISystemResourceChangeEvents, com.ibm.etools.systems.model.ISystemResourceChangeListener, SWTEventListener
Direct Known Subclasses:
ISeriesInteractiveConnectionCombo

public class ISeriesConnectionCombo
extends com.ibm.etools.systems.core.ui.widgets.SystemConnectionCombo

This re-usable widget is for selecting an iSeries 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...
 


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.widgets.SystemConnectionCombo
connectionCombo, connectionLabel, listeningForConnectionEvents, newButton, showLabel, showNewButton, showQualifiedNames
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Fields inherited from interface com.ibm.etools.systems.core.ui.widgets.ISystemCombo
Copyright
 
Fields inherited from interface com.ibm.etools.systems.model.ISystemResourceChangeEvents
EVENT_ADD, EVENT_ADD_FILTER_REFERENCE, EVENT_ADD_FILTERSTRING_REFERENCE, EVENT_ADD_MANY, EVENT_ADD_RELATIVE, EVENT_CHANGE_CHILDREN, EVENT_CHANGE_FILTER_REFERENCE, EVENT_CHANGE_FILTERSTRING_REFERENCE, EVENT_COLLAPSE_ALL, EVENT_COLLAPSE_SELECTED, EVENT_COMMAND_FINISHED, EVENT_COMMAND_HISTORY_UPDATE, EVENT_COMMAND_MESSAGE, EVENT_COMMAND_RUN, EVENT_COMMAND_SHELL_FINISHED, EVENT_COMMAND_SHELL_REMOVED, EVENT_COMPILE_COMMAND_RUN, EVENT_DELETE, EVENT_DELETE_FILTER_REFERENCE, EVENT_DELETE_FILTERSTRING_REFERENCE, EVENT_DELETE_MANY, EVENT_EXPAND_SELECTED, EVENT_ICON_CHANGE, EVENT_MOVE_FILTER_REFERENCES, EVENT_MOVE_FILTERSTRING_REFERENCES, EVENT_MOVE_MANY, EVENT_MUST_COLLAPSE, EVENT_PROPERTY_CHANGE, EVENT_PROPERTYSHEET_UPDATE, EVENT_REFRESH, EVENT_REFRESH_REMOTE, EVENT_REFRESH_SELECTED, EVENT_REFRESH_SELECTED_FILTER, EVENT_REFRESH_SELECTED_PARENT, EVENT_RENAME, EVENT_RENAME_FILTER_REFERENCE, EVENT_REPLACE_CHILDREN, EVENT_REVEAL_AND_SELECT, EVENT_SEARCH_FINISHED, EVENT_SELECT, EVENT_SELECT_EXPAND, EVENT_SELECT_REMOTE, PROPERTYSHEET_UPDATE_EVENT
 
Constructor Summary
ISeriesConnectionCombo(Composite parent)
          Constructor when you don't care about the style or default connection, and do want to show the New button.
ISeriesConnectionCombo(Composite parent, int style, ISeriesConnection defaultConnection, boolean showNewButton)
          Constructor when you want to set the style
ISeriesConnectionCombo(Composite parent, int style, com.ibm.etools.systems.model.SystemConnection defaultConnection, boolean showNewButton)
          Constructor when you want to set the style
ISeriesConnectionCombo(Composite parent, ISeriesConnection defaultConnection, boolean showNewButton)
          Constructor when you don't care about the style.
ISeriesConnectionCombo(Composite parent, com.ibm.etools.systems.model.SystemConnection defaultConnection, boolean showNewButton)
          Constructor when you don't care about the style.
 
Method Summary
 void addSelectionListener(ISeriesSearchPage aS400SearchPage)
          Method addSelectionListener.
 ISeriesConnection getISeriesConnection()
          Return the selected connection as an ISeriesConnection object.
protected  com.ibm.etools.systems.core.ui.actions.SystemNewConnectionAction getNewConnectionAction(Shell shell, ISelectionProvider selectionProvider)
          Overridable method.
 void lineUpWith(ISeriesBasePrompt otherWidget)
          If a composite widget like this is used more than once on the same page, it is nice to line up the columns.
 void lineUpWith(ISeriesConnectionCombo otherWidget)
          If a composite widget like this is used more than once on the same page, it is nice to line up the columns.
 void select(ISeriesConnection connection)
          Select an iSeries connection from the dropdown
 
Methods inherited from class com.ibm.etools.systems.core.ui.widgets.SystemConnectionCombo
addModifyListener, addNewButtonSelectionListener, addOurButtonSelectionListener, addOurConnectionSelectionListener, addSelectionChangedListener, addSelectionListener, clearSelection, clearTextSelection, createCombo, createConnectionCombo, createPushButton, createPushButton, getCombo, getConnections, getGridColumns, getItems, getNewButton, getPromptLabel, getSelection, getSelectionIndex, getSystemConnection, getText, init, init, listenToConnectionEvents, populateConnectionCombo, populateConnectionCombo, populateConnectionCombo, populateConnectionCombo, populateConnectionCombo, populateConnectionCombo, prepareComposite, refreshConnections, removeModifyListener, removeNewButtonSelectionListener, removeSelectionChangedListener, removeSelectionListener, select, select, setAutoUpperCase, setBusyCursor, setButtonToolTipText, setButtonWidthHint, setButtonWidthHint, setConnections, setConnectionToolTipText, setEnabled, setFocus, setItems, setLabel, setNewButtonFocus, setNewButtonToolTipText, setSelection, setSelectionIndex, setToolTipText, setWidthHint, sub, systemResourceChanged, widgetDisposed
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, 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 com.ibm.etools.systems.model.ISystemResourceChangeListener
getShell
 

Field Detail

copyright

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

ISeriesConnectionCombo

public ISeriesConnectionCombo(Composite parent,
                              int style,
                              com.ibm.etools.systems.model.SystemConnection defaultConnection,
                              boolean showNewButton)
Constructor when you want to set the style

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

ISeriesConnectionCombo

public ISeriesConnectionCombo(Composite parent,
                              com.ibm.etools.systems.model.SystemConnection defaultConnection,
                              boolean showNewButton)
Constructor when you don't care about the style. Defaults to SWT.NULL

Parameters:
parent - Parent composite
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

ISeriesConnectionCombo

public ISeriesConnectionCombo(Composite parent,
                              int style,
                              ISeriesConnection defaultConnection,
                              boolean showNewButton)
Constructor when you want to set the style

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

ISeriesConnectionCombo

public ISeriesConnectionCombo(Composite parent,
                              ISeriesConnection defaultConnection,
                              boolean showNewButton)
Constructor when you don't care about the style. Defaults to SWT.NULL

Parameters:
parent - Parent composite
defaultConnection - the AS/400 connection to preselect. Pass null to preselect first connection.
showNewButton - true if a New... button is to be included in this composite

ISeriesConnectionCombo

public ISeriesConnectionCombo(Composite parent)
Constructor when you don't care about the style or default connection, and do want to show the New button. This is the most common case.

Parameters:
parent - Parent composite
Method Detail

getISeriesConnection

public ISeriesConnection getISeriesConnection()
Return the selected connection as an ISeriesConnection object. This is an alternative to the inherited method getSystemConnection()which returns a SystemConnection object. The class ISeriesConnection wraps SystemConnection and adds iSeries-specific functionality for convenience.

This returns null if there is no connection currently selected.


select

public void select(ISeriesConnection connection)
Select an iSeries connection from the dropdown


getNewConnectionAction

protected com.ibm.etools.systems.core.ui.actions.SystemNewConnectionAction getNewConnectionAction(Shell shell,
                                                                                                  ISelectionProvider selectionProvider)
Overridable method. Returns action to be called when New... pressed. In our case, we restrict the system type to iSeries


lineUpWith

public void lineUpWith(ISeriesBasePrompt otherWidget)
If a composite widget like this is used more than once on the same page, it is nice to line up the columns. This method will do that, given the first composite widget. The trick to this though is that we need to know the size of other composite, which is not known until after the controls are all layed out. So only call this after all controls have been added to your dialog/wizard content area.


lineUpWith

public void lineUpWith(ISeriesConnectionCombo otherWidget)
If a composite widget like this is used more than once on the same page, it is nice to line up the columns. This method will do that, given the first composite widget. The trick to this though is that we need to know the size of other composite, which is not known until after the controls are all layed out. So only call this after all controls have been added to your dialog/wizard content area.


addSelectionListener

public void addSelectionListener(ISeriesSearchPage aS400SearchPage)
Method addSelectionListener.

Parameters:
aS400SearchPage -

iSeries Remote Systems
v6.0.0

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.