Class AbstractFileBasedActivity

All Implemented Interfaces:
Activity, FileBasedActivity, PropertyBean, Disableable

public abstract class AbstractFileBasedActivity extends AbstractActivity implements FileBasedActivity
AbstractFileBasedActivity.
Author:
Werner Randelshofer
  • Property Details

  • Field Details

    • modified

      protected final javafx.beans.property.BooleanProperty modified
    • uri

      protected final javafx.beans.property.ObjectProperty<URI> uri
    • dataFormat

      protected final javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> dataFormat
  • Constructor Details

    • AbstractFileBasedActivity

      public AbstractFileBasedActivity()
  • Method Details

    • initTitle

      protected void initTitle()
      Specified by:
      initTitle in class AbstractActivity
    • modifiedProperty

      public @NonNull javafx.beans.property.BooleanProperty modifiedProperty()
      Description copied from interface: FileBasedActivity
      The modified property indicates that the content has been modified and needs to be saved to the file.

      This property is set to true if a change in the content has been detected.

      The property is only set to false by calling FileBasedActivity.clearModified(). This is typically done by an Action invoked by the user, or by an automatic save function managed by the Application.

      Specified by:
      modifiedProperty in interface FileBasedActivity
      Returns:
      the modified property
    • clearModified

      public void clearModified()
      Description copied from interface: FileBasedActivity
      Clears the modified property.
      Specified by:
      clearModified in interface FileBasedActivity
      See Also:
    • markAsModified

      protected void markAsModified()
    • uriProperty

      public @NonNull javafx.beans.property.ObjectProperty<URI> uriProperty()
      Description copied from interface: FileBasedActivity
      This property is used to identify the file that is used for storing the content.

      This property is managed by the Actions that load and save the content from/to the file.

      Specified by:
      uriProperty in interface FileBasedActivity
      Returns:
      the uri property
    • dataFormatProperty

      public @NonNull javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> dataFormatProperty()
      Description copied from interface: FileBasedActivity
      This property specifies the format that is used for storing the content in the file.

      This property is managed by Actions. Typically by actions that load or save the content, and actions that manage file properties.

      Specified by:
      dataFormatProperty in interface FileBasedActivity
      Returns:
      the dataFormat property
    • initActions

      protected void initActions(@NonNull javafx.collections.ObservableMap<String,Action> map)
      Specified by:
      initActions in class AbstractActivity
    • destroy

      public void destroy()
      Description copied from interface: Activity
      Destroys the activity.

      See life-cycle in Activity.

      Specified by:
      destroy in interface Activity
      Overrides:
      destroy in class AbstractActivity