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:
  • Constructor Details

    • AbstractFormPart

      public AbstractFormPart()
  • Method Details

    • initialize

      public void initialize(IManagedForm form)
      Description copied from interface: IFormPart
      Initializes the part.
      Specified by:
      initialize in interface IFormPart
      Parameters:
      form - the managed form that manages the part
      See Also:
    • 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.
      Specified by:
      dispose in interface IFormPart
    • commit

      public void commit(boolean onSave)
      Commits the part. Subclasses should call 'super' when overriding.
      Specified by:
      commit in interface IFormPart
      Parameters:
      onSave - true if the request to commit has arrived as a result of the 'save' action.
    • 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 interface IFormPart
      Parameters:
      input - the form input object
      Returns:
      false
    • setFocus

      public void setFocus()
      Instructs the part to grab keyboard focus.
      Specified by:
      setFocus in interface IFormPart
    • refresh

      public void refresh()
      Refreshes the section after becoming stale (falling behind data in the model). Subclasses must call 'super' when overriding this method.
      Specified by:
      refresh in interface IFormPart
    • 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.
      Specified by:
      isDirty in interface IFormPart
      Returns:
      true if the part is dirty, false otherwise.
    • 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.
      Specified by:
      isStale in interface IFormPart
      Returns:
      true if the part is stale, false otherwise.
    • 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.