Package jmri.util.startup
Class AbstractActionModelFactory
- java.lang.Object
-
- jmri.util.startup.AbstractActionModelFactory
-
- All Implemented Interfaces:
JmriServiceProviderInterface,StartupModelFactory
- Direct Known Subclasses:
CreateButtonModelFactory,PerformActionModelFactory
public abstract class AbstractActionModelFactory extends java.lang.Object implements StartupModelFactory
Provide an abstract StartupModelFactory with common methods for factories that manipulate models that extendAbstractActionModel.
-
-
Constructor Summary
Constructors Constructor Description AbstractActionModelFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voideditModel(StartupModel model, java.awt.Component parent)Allow user to edit the model.java.lang.StringgetActionText()Get the action text for models this factory generates.java.lang.StringgetDescription()Get the description for models this factory generates.abstract java.lang.StringgetEditModelMessage()Get the message text for the dialog created ineditModel(StartupModel, java.awt.Component).voidinitialize()Provides a mechanism for theStartupActionsManagerto run any required post-construction initialization.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.util.startup.StartupModelFactory
getModelClass, newModel
-
-
-
-
Constructor Detail
-
AbstractActionModelFactory
public AbstractActionModelFactory()
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:StartupModelFactoryGet 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:
getDescriptionin interfaceStartupModelFactory- Returns:
- A short description.
-
getActionText
public java.lang.String getActionText()
Description copied from interface:StartupModelFactoryGet 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:
getActionTextin interfaceStartupModelFactory- Returns:
- Action text
-
getEditModelMessage
public abstract java.lang.String getEditModelMessage()
Get the message text for the dialog created ineditModel(StartupModel, java.awt.Component).- Returns:
- the message text
-
editModel
public void editModel(StartupModel model, java.awt.Component parent)
Description copied from interface:StartupModelFactoryAllow user to edit the model.- Specified by:
editModelin interfaceStartupModelFactory- Parameters:
model- the model to editparent- the parent component for the editing UI
-
initialize
public void initialize()
Description copied from interface:StartupModelFactoryProvides a mechanism for theStartupActionsManagerto run any required post-construction initialization.- Specified by:
initializein interfaceStartupModelFactory
-
-