|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.SystemBaseForm
public abstract class SystemBaseForm
A reusable base form.
May be used to populate a dialog or a wizard page or properties page. Often we need to support multiple ways to edit the same thing, and we need to abstract out the client area. This base class puts some structure around these abstractions. Note we don't extend Composite. Rather the subclass will create and return the composite in createContents(). This offers us more flexibility in how/where this is used.
For error checking, subclasses should simply call setPageComplete whenever they
do error checking (such as in response to an event). This will then call any
interested listeners who have registered via addPageCompleteListener(ISystemPageCompleteListener)
.
Error messages should be set via showErrorMessage(SystemMessage)
.
Field Summary | |
---|---|
protected boolean |
alreadyNotified
|
protected Vector |
verifyListeners
|
Constructor Summary | |
---|---|
SystemBaseForm(ISystemMessageLine msgLine)
Deprecated. You should now use the constructor that takes a shell. |
|
SystemBaseForm(Shell shell,
ISystemMessageLine msgLine)
Constructor. |
Method Summary | |
---|---|
protected Label |
addFillerLine(Composite parent,
int nbrColumns)
Add a spacer line |
protected Label |
addGrowableFillerLine(Composite parent,
int nbrColumns)
Add a spacer line that grows in height to absorb extra space |
void |
addPageCompleteListener(ISystemPageCompleteListener l)
Register an interest in knowing whenever setPageComplete(boolean) is
called by subclass code. |
protected Label |
addSeparatorLine(Composite parent,
int nbrColumns)
Add a separator line. |
void |
addVerifyListener(ISystemVerifyListener l)
Register an interest in knowing whenever the form is verified and error messages are updated. |
abstract Control |
createContents(Composite parent)
CreateContents is the one method that must be overridden from the parent class. |
protected Object |
getInputObject()
Return the input object as set by setInputObject(Object) . |
ISystemMessageLine |
getMessageLine()
Return the message line as set via setMessageLine |
Object |
getOutputObject()
Return the output object as set by setOutputObject(Object) . |
Shell |
getShell()
Return the shell as set via setShell(Shell) |
String |
getTheErrorMessage()
|
void |
handleEvent(Event evt)
Default implementation to satisfy Listener interface. |
boolean |
isPageComplete()
Return the current completeness value, as last set by setPageComplete(boolean) . |
protected void |
notifyVerifyListeners()
|
void |
removePageCompleteListener(ISystemPageCompleteListener l)
De-register a page complete listener. |
void |
removePageCompleteListener(ISystemVerifyListener l)
De-register a verify listener. |
void |
setInputObject(Object inputObject)
Set the input object. |
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. |
protected void |
setOutputObject(Object outputObject)
Set the output object. |
protected void |
setPageComplete(boolean complete)
The completeness of the page has changed. |
void |
setShell(Shell shell)
Occassionally we don't know the shell at constructor time, so we need to be able to set it later |
protected void |
showErrorMessage(SystemMessage msg)
Display error message or clear error message (if passed null) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector verifyListeners
protected boolean alreadyNotified
Constructor Detail |
---|
public SystemBaseForm(ISystemMessageLine msgLine)
msgLine
- A GUI widget capable of writing error messages to.public SystemBaseForm(Shell shell, ISystemMessageLine msgLine)
shell
- The parent shell.msgLine
- A GUI widget capable of writing error messages to.Method Detail |
---|
public void setMessageLine(ISystemMessageLine msgLine)
public ISystemMessageLine getMessageLine()
public void setShell(Shell shell)
public Shell getShell()
public void setInputObject(Object inputObject)
protected Object getInputObject()
setInputObject(Object)
.
protected void setOutputObject(Object outputObject)
public Object getOutputObject()
setOutputObject(Object)
.
public void handleEvent(Event evt)
handleEvent
in interface Listener
public void addPageCompleteListener(ISystemPageCompleteListener l)
setPageComplete(boolean)
is
called by subclass code.
public void removePageCompleteListener(ISystemPageCompleteListener l)
protected void setPageComplete(boolean complete)
addPageCompleteListener(ISystemPageCompleteListener)
public boolean isPageComplete()
setPageComplete(boolean)
.
isPageComplete
in interface ISystemConnectionWizardErrorUpdater
public abstract Control createContents(Composite parent)
parent
- The parent compositeprotected void showErrorMessage(SystemMessage msg)
protected Label addSeparatorLine(Composite parent, int nbrColumns)
protected Label addFillerLine(Composite parent, int nbrColumns)
protected Label addGrowableFillerLine(Composite parent, int nbrColumns)
public void addVerifyListener(ISystemVerifyListener l)
addVerifyListener
in interface ISystemConnectionWizardErrorUpdater
protected void notifyVerifyListeners()
public void removePageCompleteListener(ISystemVerifyListener l)
public String getTheErrorMessage()
getTheErrorMessage
in interface ISystemConnectionWizardErrorUpdater
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |