|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.SystemBaseForm
com.ibm.etools.systems.core.ui.widgets.SystemSelectConnectionForm
A reusable form for prompting for a connection. Unlike SystemConnectionCombo
,
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(SystemConnection)
setSystemTypes(String[])
setShowPropertySheet(boolean)
#enableAddMode(com.ibm.etools.systems.files.ui.ISystemAddFileListener)
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
|
static String |
copyright
|
protected SystemConnection |
defaultConn
|
protected boolean |
initDone
|
protected Vector |
listeners
|
protected boolean |
multipleSelectionMode
|
protected Text |
nameEntryValue
|
protected Composite |
outerParent
|
protected SystemConnection |
outputConnection
|
protected SystemConnection[] |
outputConnections
|
protected Object |
previousSelection
|
protected static int |
PROMPT_WIDTH
|
protected SystemPropertySheetForm |
ps
|
protected Composite |
ps_composite
|
protected boolean |
showPropertySheet
|
protected Label |
spacer1
|
protected Label |
spacer2
|
protected String[] |
systemTypes
|
protected SystemViewForm |
tree
|
protected String |
verbage
|
protected Label |
verbageLabel
|
Fields inherited from class com.ibm.etools.systems.core.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 |
SystemConnection |
getSelectedConnection()
Return selected connection |
SystemConnection[] |
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(SystemConnection 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(String systemType)
Restrict to one system type |
void |
setSystemTypes(String[] 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 com.ibm.etools.systems.core.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 |
public static final String copyright
protected static final int PROMPT_WIDTH
protected Label verbageLabel
protected Label spacer1
protected Label spacer2
protected Text nameEntryValue
protected SystemViewForm tree
protected SystemPropertySheetForm ps
protected Composite outerParent
protected Composite ps_composite
protected String verbage
protected String[] systemTypes
protected SystemConnection defaultConn
protected boolean allowNew
protected boolean multipleSelectionMode
protected boolean showPropertySheet
protected Vector listeners
protected SystemConnection[] outputConnections
protected SystemConnection 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(String[])
Method Detail |
public void setDefaultConnection(SystemConnection conn)
public void setShowNewConnectionPrompt(boolean show)
public void setSystemTypes(String[] systemTypes)
systemTypes
- the system types to restrict what connections are shown and what types of connections
the user can createISystemTypes
public void setSystemType(String systemType)
systemType
- the system type to restrict what connections are shown and what types of connections
the user can createISystemTypes
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 SystemConnection[] getSelectedConnections()
setMultipleSelectionMode(boolean)
public SystemConnection 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 SystemBaseForm
parent
- The parent compositepublic boolean verify()
protected void setNameText(String text)
public void selectionChanged(SelectionChangedEvent e)
protected Object getFirstSelection(ISelection selection)
protected Object[] getSelections(ISelection selection)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |