|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.ui.SystemConnectionForm
A reusable form for prompting for connection information, in new or update mode. May be used to populate a dialog or a wizard page.
You may subclass this to refine the form. In this case you can override the getForm method of SystemNewConnectionWizardDefaultMainPage and SystemUpdateConnection to return your subclass.
| Fields inherited from interface org.eclipse.rse.core.ISystemUserIdConstants |
|---|
USERID_LOCATION_CONNECTION, USERID_LOCATION_DEFAULT_OVERALL, USERID_LOCATION_DEFAULT_SYSTEMTYPE, USERID_LOCATION_NOTSET, USERID_LOCATION_SUBSYSTEM |
| Constructor Summary | |
|---|---|
SystemConnectionForm(ISystemMessageLine msgLine,
ISystemConnectionFormCaller caller)
Constructor. |
|
| Method Summary | |
|---|---|
Control |
createContents(Composite parent,
boolean updateMode,
String parentHelpId)
CreateContents is the one method that must be overridden from the parent class. |
String |
getConnectionDescription()
Return user-entered Description. |
String |
getConnectionName()
Return user-entered Connection Name. |
static ISystemValidator |
getConnectionNameValidator(IHost conn)
Reusable method to return a name validator for renaming a connection. |
static ISystemValidator |
getConnectionNameValidator(ISystemProfile profile)
Reusable method to return a name validator for renaming a connection. |
static ISystemValidator[] |
getConnectionNameValidators()
Reusable method to return name validators for creating a connection. |
String |
getDefaultUserId()
Return user-entered Default User Id. |
String |
getHostName()
Return user-entered Host Name. |
Control |
getInitialFocusControl()
Return control to recieve initial focus |
String |
getProfileName()
Return user-selected profile to contain this connection Call this after finish ends successfully, and only in update mode. |
protected IRunnableContext |
getRunnableContext()
Return the runnable context from the hosting dialog or wizard, if applicable |
String |
getSystemType()
Return user-entered System Type. |
int |
getUserIdLocation()
If a default userId was specified, the user may have been queried where to put the userId. |
void |
handleEvent(Event evt)
Default implementation to satisfy Listener interface. |
void |
initializeInputFields(IHost conn)
Initialize input fields to current values in update mode. |
void |
initializeInputFields(IHost conn,
boolean updateMode)
Initialize input fields to current values in update mode. |
protected void |
internalSetConnectionName(String name)
Set the connection name internally without validation |
boolean |
isConnectionUnique()
|
boolean |
isPageComplete()
This method can be called by the dialog or wizard page host, to decide whether to enable or disable the next, final or ok buttons. |
boolean |
isWorkOffline()
Return the user-entered value for work offline. |
void |
restrictSystemType(String systemType)
Call this to restrict the system type that the user is allowed to choose |
void |
restrictSystemTypes(String[] systemTypes)
Call this to restrict the system types that the user is allowed to choose |
void |
run()
|
void |
run(IProgressMonitor pm)
METHOD REQUIRED BY IRunnableWithProgress, USED TO SHOW PROGRESS WHILE VERIFYING HOSTNAME |
void |
setConnectionName(String name)
Preset the connection name |
void |
setConnectionNameValidators(ISystemValidator[] v)
Call this to specify a validator for the connection name. |
void |
setCurrentlySelectedConnection(IHost connection)
Set the currently selected connection so as to better initialize input fields |
void |
setHostName(String name)
Preset the host name |
void |
setHostNameValidator(ISystemValidator v)
Call this to specify a validator for the hostname. |
void |
setMessageLine(ISystemMessageLine msgLine)
Often the message line is null at the time of instantiation, so we have to call this after it is created. |
void |
setPageComplete()
Inform caller of page-complete status of this form |
void |
setProfileNamePreSelection(String selection)
Set the profile name to preselect |
void |
setProfileNames(String[] names)
Set the profile names to show in the combo |
void |
setUserId(String userId)
For "new" mode, allows setting of the initial user Id. |
void |
setUserIdValidator(ISystemValidator v)
Call this to specify a validator for the userId. |
protected SystemMessage |
validateConnectionNameInput(boolean userTyped)
This hook method is called whenever the text changes in the input field. |
protected SystemMessage |
validateHostNameInput()
This hook method is called whenever the text changes in the input field. |
protected SystemMessage |
validateUserIdInput()
This hook method is called whenever the text changes in the input field. |
boolean |
verify(boolean okPressed)
Verifies all input. |
void |
widgetDefaultSelected(SelectionEvent event)
Combo selection listener method |
void |
widgetSelected(SelectionEvent event)
Combo selection listener method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean CREATE_MODE
public static final boolean UPDATE_MODE
public static String lastSystemType
protected Label labelType
protected Label labelConnectionName
protected Label labelHostName
protected Label labelUserId
protected Label labelDescription
protected Label labelProfile
protected Label labelTypeValue
protected Label labelSystemTypeValue
protected Label labelProfileValue
protected Combo textSystemType
protected Combo textHostName
protected Combo profileCombo
protected Text textConnectionName
protected Text textDescription
protected Button verifyHostNameCB
protected Button workOfflineCB
protected InheritableEntryField textUserId
protected Label textSystemTypeReadOnly
protected ISystemValidator[] nameValidators
protected ISystemValidator hostValidator
protected ISystemValidator userIdValidator
protected ISystemMessageLine msgLine
protected ISystemConnectionFormCaller caller
protected String[] restrictSystemTypesTo
protected String defaultSystemType
protected String defaultConnectionName
protected String defaultHostName
protected String defaultUserId
protected String defaultDescription
protected String defaultProfile
protected String[] defaultProfileNames
protected boolean defaultWorkOffline
protected boolean userPickedVerifyHostnameCB
protected int hostNameLength
protected int connectionNameLength
protected int userIdLength
protected int descriptionLength
protected int userIdLocation
protected boolean callerInstanceOfWizardPage
protected boolean callerInstanceOfSystemPromptDialog
protected boolean callerInstanceOfPropertyPage
protected boolean userIdFromSystemTypeDefault
protected boolean updateMode
protected boolean initDone
protected boolean contentsCreated
protected boolean connectionNameEmpty
protected boolean connectionNameListen
protected boolean singleTypeMode
protected String originalHostName
protected String currentHostName
protected SystemMessage errorMessage
protected SystemMessage verifyingHostName
| Constructor Detail |
public SystemConnectionForm(ISystemMessageLine msgLine,
ISystemConnectionFormCaller caller)
msgLine - A GUI widget capable of writing error messages to.caller - The wizardpage or dialog hosting this form.| Method Detail |
public void setMessageLine(ISystemMessageLine msgLine)
public void setConnectionNameValidators(ISystemValidator[] v)
public void setHostNameValidator(ISystemValidator v)
public void setUserIdValidator(ISystemValidator v)
public void setProfileNames(String[] names)
public void setProfileNamePreSelection(String selection)
public void setUserId(String userId)
public void setCurrentlySelectedConnection(IHost connection)
public void restrictSystemType(String systemType)
public void restrictSystemTypes(String[] systemTypes)
public void initializeInputFields(IHost conn)
conn - The SystemConnection object that is being modified.
public void initializeInputFields(IHost conn,
boolean updateMode)
conn - The SystemConnection object that is being modified.public void setConnectionName(String name)
public void setHostName(String name)
public boolean isPageComplete()
public boolean isConnectionUnique()
public boolean verify(boolean okPressed)
okPressed - true if this verify is being done when OK is pressed. If so, we position
cursor on error checking, else we do not.
protected IRunnableContext getRunnableContext()
public String getSystemType()
public String getConnectionName()
public String getHostName()
public String getDefaultUserId()
public boolean isWorkOffline()
public String getConnectionDescription()
public String getProfileName()
public int getUserIdLocation()
public Control createContents(Composite parent,
boolean updateMode,
String parentHelpId)
parent - The parent compositeupdateMode - true if we are in update mode versus create mode.public Control getInitialFocusControl()
public void handleEvent(Event evt)
handleEvent in interface Listenerpublic void widgetDefaultSelected(SelectionEvent event)
widgetDefaultSelected in interface SelectionListenerpublic void widgetSelected(SelectionEvent event)
widgetSelected in interface SelectionListenerprotected SystemMessage validateConnectionNameInput(boolean userTyped)
ISystemValidator object.
If the ISystemValidator reports an error the error message is displayed
in the Dialog's message line.
setConnectionNameValidators(ISystemValidator[])protected void internalSetConnectionName(String name)
protected SystemMessage validateHostNameInput()
ISystemValidator object.
If the ISystemValidator reports an error the error message is displayed
in the Dialog's message line.
setHostNameValidator(ISystemValidator)protected SystemMessage validateUserIdInput()
ISystemValidator object.
If the ISystemValidator reports an error the error message is displayed
in the Dialog's message line.
setUserIdValidator(ISystemValidator)public void setPageComplete()
public static ISystemValidator getConnectionNameValidator(IHost conn)
conn - the current connection object on updates. Can be null for new names. Used
to remove from the existing name list the current connection.public static ISystemValidator getConnectionNameValidator(ISystemProfile profile)
profile - the current connection object's profile from which to get the existing names.
Can be null for syntax checking only, versus name-in-use.public static ISystemValidator[] getConnectionNameValidators()
public void run()
run in interface Runnable
public void run(IProgressMonitor pm)
throws InvocationTargetException,
InterruptedException
run in interface IRunnableWithProgressInvocationTargetException
InterruptedException
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||