Package org.eclipse.ui.forms
Class AbstractFormPart
java.lang.Object
org.eclipse.ui.forms.AbstractFormPart
- All Implemented Interfaces:
IFormPart
- Direct Known Subclasses:
SectionPart
AbstractFormPart implements IFormPart interface and can be used as a
convenient base class for concrete form parts. If a method contains
code that must be called, look for instructions to call 'super'
when overriding.
- Since:
- 3.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commit
(boolean onSave) Commits the part.void
dispose()
Disposes the part.Returns the form that manages this part.void
initialize
(IManagedForm form) Initializes the part.boolean
isDirty()
Tests whether the part is dirty i.e. its widgets have state that is newer than the data in the model.boolean
isStale()
Tests whether the part is stale i.e. its widgets have state that is older than the data in the model.void
Marks the part dirty.void
Marks the part stale.void
refresh()
Refreshes the section after becoming stale (falling behind data in the model).void
setFocus()
Instructs the part to grab keyboard focus.boolean
setFormInput
(Object input) Sets the overall form input.
-
Constructor Details
-
AbstractFormPart
public AbstractFormPart()
-
-
Method Details
-
initialize
Description copied from interface:IFormPart
Initializes the part.- Specified by:
initialize
in interfaceIFormPart
- Parameters:
form
- the managed form that manages the part- See Also:
-
getManagedForm
Returns the form that manages this part.- Returns:
- the managed form
-
dispose
public void dispose()Disposes the part. Subclasses should override to release any system resources. -
commit
public void commit(boolean onSave) Commits the part. Subclasses should call 'super' when overriding. -
setFormInput
Sets the overall form input. Subclases may elect to override the method and adjust according to the form input.- Specified by:
setFormInput
in interfaceIFormPart
- Parameters:
input
- the form input object- Returns:
false
-
setFocus
public void setFocus()Instructs the part to grab keyboard focus. -
refresh
public void refresh()Refreshes the section after becoming stale (falling behind data in the model). Subclasses must call 'super' when overriding this method. -
markDirty
public void markDirty()Marks the part dirty. Subclasses should call this method as a result of user interaction with the widgets in the section. -
isDirty
public boolean isDirty()Tests whether the part is dirty i.e. its widgets have state that is newer than the data in the model. -
isStale
public boolean isStale()Tests whether the part is stale i.e. its widgets have state that is older than the data in the model. -
markStale
public void markStale()Marks the part stale. Subclasses should call this method as a result of model notification that indicates that the content of the section is no longer in sync with the model.
-