Package org.eclipse.ui.forms
Class AbstractFormPart
- java.lang.Object
-
- org.eclipse.ui.forms.AbstractFormPart
-
- All Implemented Interfaces:
IFormPart
- Direct Known Subclasses:
SectionPart
public abstract class AbstractFormPart extends Object implements IFormPart
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:
Section
-
-
Constructor Summary
Constructors Constructor Description AbstractFormPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit(boolean onSave)
Commits the part.void
dispose()
Disposes the part.IManagedForm
getManagedForm()
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
markDirty()
Marks the part dirty.void
markStale()
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.
-
-
-
Method Detail
-
initialize
public void initialize(IManagedForm form)
Description copied from interface:IFormPart
Initializes the part.- Specified by:
initialize
in interfaceIFormPart
- Parameters:
form
- the managed form that manages the part- See Also:
IFormPart.initialize(org.eclipse.ui.forms.IManagedForm)
-
getManagedForm
public IManagedForm 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
public boolean setFormInput(Object input)
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.
-
-