Class AbstractFormPart

All Implemented Interfaces:
Direct Known Subclasses:

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.
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
      form - the managed form that manages the part
      See Also:
    • getManagedForm

      public IManagedForm getManagedForm()
      Returns the form that manages this part.
      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
      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
      input - the form input object
    • 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
      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
      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.