public interface IManagedForm
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.
This interface should not be extended or implemented. New form instances should be created using ManagedForm.
ManagedForm
Modifier and Type | Method and Description |
---|---|
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,
org.eclipse.jface.viewers.ISelection selection)
A part can use this method to notify other parts that implement
IPartSelectionListener about selection changes.
|
java.lang.Object |
getContainer()
Returns the container of this form.
|
org.eclipse.swt.custom.ScrolledComposite |
getForm()
Returns the form widget managed by this form.
|
java.lang.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.
|
void |
initialize()
Initializes the form by looping through the managed parts and
initializing them.
|
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(java.lang.Object container)
Sets the container that owns this form.
|
boolean |
setInput(java.lang.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.
|
void initialize()
FormToolkit getToolkit()
org.eclipse.swt.custom.ScrolledComposite getForm()
void reflow(boolean changed)
changed
- if true
, discard cached layout informationvoid fireSelectionChanged(IFormPart part, org.eclipse.jface.viewers.ISelection selection)
part
- the part that broadcasts the selectionselection
- the selection in the partIFormPart[] getParts()
void addPart(IFormPart part)
part
- the part to addvoid removePart(IFormPart part)
part
- the part to removeboolean setInput(java.lang.Object input)
input
- the new page inputtrue
if the form contains this object,
false
otherwise.java.lang.Object getInput()
null
if not applicable.boolean isDirty()
true
if at least one managed part is dirty,
false
otherwise.void dirtyStateChanged()
isDirty()
void commit(boolean onSave)
onSave
- boolean isStale()
true
if the form is stale, false
otherwise.void staleStateChanged()
void refresh()
void setContainer(java.lang.Object container)
container
- the container of this formjava.lang.Object getContainer()
Copyright © 2007–2020. All rights reserved.