Interface StartupModelFactory

All Superinterfaces:
JmriServiceProviderInterface
All Known Implementing Classes:
AbstractActionModelFactory, AbstractFileModelFactory, CreateButtonModelFactory, PerformActionModelFactory, PerformFileModelFactory, PerformScriptModelFactory, ScriptButtonModelFactory, StartupPauseFactory, TriggerRouteModelFactory

A factory for StartupModels. StartupModelFactories are loaded via the Java ServiceLoader mechanism to allow the actions JMRI can take on startup to be extended within an external JAR.
  • Method Details

    • getModelClass

      Get the Class that is generated by this factory. The Class must be a subclass of StartupModel.
      Returns:
      The class this factory generates.
    • getDescription

      Get the description for models this factory generates. This is used in the preferences UI to describe the class, so it should be short.
      Returns:
      A short description.
    • getActionText

      Get the action text for models this factory generates. This is used in menus and UI elements that start the process of creating and editing a new startup action. If the startup action is not configurable, this should be the same as getDescription().
      Returns:
      Action text
    • newModel

      Create a new instance of the model.
      Returns:
      the new instance
    • editModel

      void editModel(StartupModel model, Component parent)
      Allow user to edit the model.
      Parameters:
      model - the model to edit
      parent - the parent component for the editing UI
    • initialize

      void initialize()
      Provides a mechanism for the StartupActionsManager to run any required post-construction initialization.