Package apps.startup
Class ScriptButtonModelFactory
- java.lang.Object
-
- apps.startup.ScriptButtonModelFactory
-
- All Implemented Interfaces:
JmriServiceProviderInterface
,StartupModelFactory
public class ScriptButtonModelFactory extends java.lang.Object implements StartupModelFactory
-
-
Constructor Summary
Constructors Constructor Description ScriptButtonModelFactory()
-
Method Summary
All Methods Instance Methods Concrete 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.ScriptButtonModel
newModel()
Create a new instance of the model.
-
-
-
Constructor Detail
-
ScriptButtonModelFactory
public ScriptButtonModelFactory()
-
-
Method Detail
-
getModelClass
public java.lang.Class<? extends StartupModel> getModelClass()
Description copied from interface:StartupModelFactory
Get theClass
that is generated by this factory. The Class must be a subclass ofStartupModel
.- Specified by:
getModelClass
in interfaceStartupModelFactory
- Returns:
- The class this factory generates.
-
newModel
public ScriptButtonModel newModel()
Description copied from interface:StartupModelFactory
Create a new instance of the model.- Specified by:
newModel
in interfaceStartupModelFactory
- Returns:
- the new instance
-
getDescription
public java.lang.String getDescription()
Description copied from interface:StartupModelFactory
Get the description for models this factory generates. This is used in the preferences UI to describe the class, so it should be short.- Specified by:
getDescription
in interfaceStartupModelFactory
- Returns:
- A short description.
-
getActionText
public java.lang.String getActionText()
Description copied from interface:StartupModelFactory
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 asStartupModelFactory.getDescription()
.- Specified by:
getActionText
in interfaceStartupModelFactory
- Returns:
- Action text
-
editModel
public void editModel(StartupModel model, java.awt.Component parent)
Description copied from interface:StartupModelFactory
Allow user to edit the model.- Specified by:
editModel
in interfaceStartupModelFactory
- Parameters:
model
- the model to editparent
- the parent component for the editing UI
-
initialize
public void initialize()
Description copied from interface:StartupModelFactory
Provides a mechanism for theStartupActionsManager
to run any required post-construction initialization.- Specified by:
initialize
in interfaceStartupModelFactory
-
-