|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Managed form wraps a form widget and adds life cycle methods for form parts. A form part is a portion of the form that participates in form life cycle events.
There is no 1/1 mapping between widgets and form parts. A widget like Section can be a part by itself, but a number of widgets can gather around one form part.
Although many Eclipse Forms classes expect IManagedForm interface, implementing it is not required. Instead, ManagedForm should either be used as-is or subclassed.
ManagedForm
Method Summary | |
void |
addPart(IFormPart part)
Adds the new part to the form. |
void |
commit(boolean onSave)
Commits the dirty form. |
void |
dirtyStateChanged()
Notifies the form that the dirty state of one of its parts has changed. |
void |
fireSelectionChanged(IFormPart part,
ISelection selection)
A part can use this method to notify other parts that implement IPartSelectionListener about selection changes. |
Object |
getContainer()
Returns the container of this form. |
ScrolledForm |
getForm()
Returns the form widget managed by this form. |
Object |
getInput()
Returns the current page input. |
IFormPart[] |
getParts()
Returns all the parts currently managed by this form. |
FormToolkit |
getToolkit()
Returns the toolkit used by this form. |
boolean |
isDirty()
Tests if form is dirty. |
boolean |
isStale()
Tests if form is stale. |
void |
reflow(boolean changed)
Reflows the form as a result of the layout change. |
void |
refresh()
Refreshes the form by refreshing every part that is stale. |
void |
removePart(IFormPart part)
Removes the part from the form. |
void |
setContainer(Object container)
Sets the container that owns this form. |
boolean |
setInput(Object input)
Sets the input of this page to the provided object. |
void |
staleStateChanged()
Notifies the form that the stale state of one of its parts has changed. |
Method Detail |
public FormToolkit getToolkit()
public ScrolledForm getForm()
public void reflow(boolean changed)
changed
- if true
, discard cached layout informationpublic void fireSelectionChanged(IFormPart part, ISelection selection)
part
- the part that broadcasts the selectionselection
- the selection in the partpublic IFormPart[] getParts()
public void addPart(IFormPart part)
part
- the part to addpublic void removePart(IFormPart part)
part
- the part to removepublic boolean setInput(Object input)
input
- the new page input
true
if the form contains this object,
false
otherwise.public Object getInput()
null
if not applicable.public boolean isDirty()
true
if at least one managed part is dirty,
false
otherwise.public void dirtyStateChanged()
isDirty()
public void commit(boolean onSave)
onSave
- public boolean isStale()
true
if the form is stale, false
otherwise.public void staleStateChanged()
public void refresh()
public void setContainer(Object container)
container
- the container of this formpublic Object getContainer()
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.