Package jmri.util.startup
Interface StartupModelFactory
-
- All Superinterfaces:
JmriServiceProviderInterface
- All Known Implementing Classes:
AbstractActionModelFactory
,AbstractFileModelFactory
,CreateButtonModelFactory
,PerformActionModelFactory
,PerformFileModelFactory
,PerformScriptModelFactory
,ScriptButtonModelFactory
,StartupPauseFactory
,TriggerRouteModelFactory
public interface StartupModelFactory extends JmriServiceProviderInterface
A factory forStartupModel
s. StartupModelFactories are loaded via the JavaServiceLoader
mechanism to allow the actions JMRI can take on startup to be extended within an external JAR.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
editModel(StartupModel model, java.awt.Component parent)
Allow user to edit the model.java.lang.String
getActionText()
Get the action text for models this factory generates.java.lang.String
getDescription()
Get the description for models this factory generates.java.lang.Class<? extends StartupModel>
getModelClass()
Get theClass
that is generated by this factory.void
initialize()
Provides a mechanism for theStartupActionsManager
to run any required post-construction initialization.StartupModel
newModel()
Create a new instance of the model.
-
-
-
Method Detail
-
getModelClass
java.lang.Class<? extends StartupModel> getModelClass()
Get theClass
that is generated by this factory. The Class must be a subclass ofStartupModel
.- Returns:
- The class this factory generates.
-
getDescription
java.lang.String 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
java.lang.String 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
StartupModel newModel()
Create a new instance of the model.- Returns:
- the new instance
-
editModel
void editModel(StartupModel model, java.awt.Component parent)
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 theStartupActionsManager
to run any required post-construction initialization.
-
-