Package jmri.util.startup
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 Summary
Modifier and TypeMethodDescriptionvoideditModel(StartupModel model, Component parent) Allow user to edit the model.Get the action text for models this factory generates.Get the description for models this factory generates.Class<? extends StartupModel>Get theClassthat is generated by this factory.voidProvides a mechanism for theStartupActionsManagerto run any required post-construction initialization.newModel()Create a new instance of the model.
-
Method Details
-
getModelClass
Class<? extends StartupModel> getModelClass()Get theClassthat is generated by this factory. The Class must be a subclass ofStartupModel.- 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 asgetDescription().- Returns:
- Action text
-
newModel
Create a new instance of the model.- Returns:
- the new instance
-
editModel
Allow user to edit the model.- Parameters:
model- the model to editparent- the parent component for the editing UI
-
initialize
void initialize()Provides a mechanism for theStartupActionsManagerto run any required post-construction initialization.
-