|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.ui.SystemBaseForm
org.eclipse.rse.ui.widgets.SystemSelectConnectionForm
public class SystemSelectConnectionForm
A reusable form for prompting for a connection. Unlike SystemHostCombo,
this form uses a list box to show the available connections.
This form may be used to populate a dialog or a wizard page.
To configure the functionality, call these methods:
setShowNewConnectionPrompt(boolean)
setDefaultConnection(IHost)
setSystemTypes(IRSESystemType[])
setShowPropertySheet(boolean)
setMultipleSelectionMode(boolean)
To configure the text on the dialog, call these methods:
After running, call these methods to get the output:
| Field Summary | |
|---|---|
protected boolean |
allowNew
|
protected int |
autoExpandDepth
|
protected boolean |
contentsCreated
|
protected IHost |
defaultConn
|
protected boolean |
initDone
|
protected Vector |
listeners
|
protected boolean |
multipleSelectionMode
|
protected Text |
nameEntryValue
|
protected Composite |
outerParent
|
protected IHost |
outputConnection
|
protected IHost[] |
outputConnections
|
protected Object |
previousSelection
|
protected static int |
PROMPT_WIDTH
|
protected org.eclipse.rse.internal.ui.view.SystemPropertySheetForm |
ps
|
protected Composite |
ps_composite
|
protected boolean |
showPropertySheet
|
protected Label |
spacer1
|
protected Label |
spacer2
|
protected IRSESystemType[] |
systemTypes
|
protected org.eclipse.rse.internal.ui.view.SystemViewForm |
tree
|
protected String |
verbiage
|
protected Label |
verbiageLabel
|
| Fields inherited from class org.eclipse.rse.ui.SystemBaseForm |
|---|
alreadyNotified, verifyListeners |
| Constructor Summary | |
|---|---|
SystemSelectConnectionForm(Shell shell,
ISystemMessageLine msgLine)
Constructor |
|
| Method Summary | |
|---|---|
void |
addSelectionChangedListener(ISelectionChangedListener l)
Add a listener to selection change events in the list |
Control |
createContents(Composite parent)
In this method, we populate the given SWT container with widgets and return the container to the caller. |
void |
dispose()
|
protected Object |
getFirstSelection(ISelection selection)
Return first item currently selected. |
Control |
getInitialFocusControl()
Return control to recieve initial focus |
boolean |
getMultipleSelectionMode()
Return the multiple selection mode current setting |
IHost |
getSelectedConnection()
Return selected connection |
IHost[] |
getSelectedConnections()
Return all selected connections. |
protected Object[] |
getSelections(ISelection selection)
Return all items currently selected. |
void |
removeSelectionChangedListener(ISelectionChangedListener l)
Remove a listener for selection change events in the list |
void |
selectionChanged(SelectionChangedEvent e)
User selected something in the tree. |
void |
setDefaultConnection(IHost conn)
Set the connection to default the selection to |
void |
setMessage(String message)
Set the message shown as the text at the top of the form. |
void |
setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. |
protected void |
setNameText(String text)
|
void |
setShowNewConnectionPrompt(boolean show)
Set to true if we are to allow users to create a new connection. |
void |
setShowPropertySheet(boolean show)
Show the property sheet on the right hand side, to show the properties of the selected connection. |
void |
setSystemType(IRSESystemType systemType)
Restrict to one system type. |
void |
setSystemTypes(IRSESystemType[] systemTypes)
Restrict to certain system types. |
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 org.eclipse.rse.ui.SystemBaseForm |
|---|
addFillerLine, addGrowableFillerLine, addPageCompleteListener, addSeparatorLine, addVerifyListener, getInputObject, getMessageLine, getOutputObject, getShell, getTheErrorMessage, handleEvent, isPageComplete, notifyVerifyListeners, removePageCompleteListener, removePageCompleteListener, setInputObject, setMessageLine, setOutputObject, setPageComplete, setShell, showErrorMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int PROMPT_WIDTH
protected Label verbiageLabel
protected Label spacer1
protected Label spacer2
protected Text nameEntryValue
protected org.eclipse.rse.internal.ui.view.SystemViewForm tree
protected org.eclipse.rse.internal.ui.view.SystemPropertySheetForm ps
protected Composite outerParent
protected Composite ps_composite
protected String verbiage
protected IRSESystemType[] systemTypes
protected IHost defaultConn
protected boolean allowNew
protected boolean multipleSelectionMode
protected boolean showPropertySheet
protected Vector listeners
protected IHost[] outputConnections
protected IHost outputConnection
protected boolean initDone
protected boolean contentsCreated
protected int autoExpandDepth
protected Object previousSelection
| Constructor Detail |
|---|
public SystemSelectConnectionForm(Shell shell,
ISystemMessageLine msgLine)
shell - The shell hosting this formmsgLine - A GUI widget capable of writing error messages to.setShowNewConnectionPrompt(boolean),
setSystemTypes(IRSESystemType[])| Method Detail |
|---|
public void setDefaultConnection(IHost conn)
public void setShowNewConnectionPrompt(boolean show)
public void setSystemTypes(IRSESystemType[] systemTypes)
systemTypes - the system types to restrict what connections
are shown and what types of connections the user can create.public void setSystemType(IRSESystemType systemType)
systemType - the system type to restrict what connections
are shown and what types of connections the user can create.public void setMessage(String message)
public void setShowPropertySheet(boolean show)
Default is false
public void setMultipleSelectionMode(boolean multiple)
If you turn on multiple selection mode, you must use the getSelectedConnections() method to retrieve the list of selected connections.
getSelectedConnections()public void addSelectionChangedListener(ISelectionChangedListener l)
public void removeSelectionChangedListener(ISelectionChangedListener l)
public IHost[] getSelectedConnections()
setMultipleSelectionMode(boolean)public IHost getSelectedConnection()
public boolean getMultipleSelectionMode()
public Control getInitialFocusControl()
public boolean toggleShowPropertySheet(Shell shell,
Control contents)
shell - Use getShell() in your dialog or wizard pagecontents - Use getContents() in your dialog or wizard page
public void dispose()
public Control createContents(Composite parent)
createContents in class SystemBaseFormparent - The parent compositepublic boolean verify()
protected void setNameText(String text)
public void selectionChanged(SelectionChangedEvent e)
selectionChanged in interface ISelectionChangedListenerprotected Object getFirstSelection(ISelection selection)
protected Object[] getSelections(ISelection selection)
|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||