Class AbstractFileBasedApplication

java.lang.Object
javafx.application.Application
org.jhotdraw8.application.AbstractApplication
org.jhotdraw8.application.AbstractFileBasedApplication
All Implemented Interfaces:
Application, FileBasedApplication, PropertyBean, Disableable

public abstract class AbstractFileBasedApplication extends AbstractApplication implements FileBasedApplication
An AbstractFileBasedApplication handles the life-cycle of FileBasedActivity objects and provides stages to present them on screen.

This implementation supports the following command line parameters:

     [path ...]
 
path
The URI to a file. Opens a FileBasedActivity for each provided path.
Author:
Werner Randelshofer
  • Property Details

  • Field Details

  • Constructor Details

    • AbstractFileBasedApplication

      public AbstractFileBasedApplication()
  • Method Details

    • main

      public static void main(String[] args)
      Parameters:
      args - the command line arguments
    • activeActivityProperty

      public javafx.beans.property.ReadOnlyObjectProperty<Activity> activeActivityProperty()
      Description copied from interface: Application
      Provides the currently active activities. This is the last activities which was focus owner. Returns null, if the application has no views.
      Specified by:
      activeActivityProperty in interface Application
      Returns:
      the activeActivity property
    • createMenuBar

      protected @Nullable javafx.scene.control.MenuBar createMenuBar(@Nullable FileBasedActivity activity, @Nullable javafx.stage.Stage stage, @NonNull Map<String,Action> actions)
      Creates a menu bar and sets it to the stage or to the system menu.
      Parameters:
      stage - the stage, or null to set the system menu
      actions - the action map
      Returns:
      the menu bar
    • exit

      public void exit()
      Description copied from interface: Application
      Exits the application.
      Specified by:
      exit in interface Application
    • onActivityActivated

      protected void onActivityActivated(@NonNull FileBasedActivity view)
      Called immediately when a views needs to be activated.
      Parameters:
      view - the view
    • onActivityAdded

      protected void onActivityAdded(@NonNull FileBasedActivity activity)
      Called immediately after a view has been added to the views property.
      Parameters:
      activity - the activity
    • createStage

      protected @NonNull javafx.stage.Stage createStage(@NonNull FileBasedActivity activity)
    • onActivityDeactivated

      protected void onActivityDeactivated(@NonNull FileBasedActivity view)
      Called immediately when a view needs to be deactivated.
      Parameters:
      view - the view
    • onActivityRemoved

      protected void onActivityRemoved(@NonNull FileBasedActivity activity)
      Called immediately after a view has been removed from the views property.
      Parameters:
      activity - the view
    • onTitleChanged

      protected void onTitleChanged(javafx.beans.Observable obs)
    • start

      public void start(javafx.stage.Stage primaryStage)
      Specified by:
      start in class javafx.application.Application
    • getUrisToOpen

      protected List<URI> getUrisToOpen()
    • init

      public final void init()
      Overrides:
      init in class javafx.application.Application
    • initTheme

      protected void initTheme()
    • initResourceBundle

      protected void initResourceBundle()
    • initProperties

      protected void initProperties()
    • initFactories

      protected void initFactories()
    • initActions

      protected void initActions(@NonNull javafx.collections.ObservableMap<String,Action> map)