Package org.scictrl.mp.orbitcorrect.mvc
Class ApplicationController<M extends ApplicationModel,W extends ApplicationView<?,?,?>>
java.lang.Object
org.scictrl.mp.orbitcorrect.mvc.ApplicationController<M,W>
- Type Parameters:
M-ApplicationModelimplementation typeW-ApplicationViewimplementation type
public abstract class ApplicationController<M extends ApplicationModel,W extends ApplicationView<?,?,?>>
extends Object
Abstract class on which application should be built.
It is the controller part of MVC.
It has references to the ApplicationView and DataModel and ApplicationEngine, which has common
application writing support for DataBush based applications.
- Author:
- igor@scictrl.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.logging.log4j.LoggerLogger instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener.voidaddPropertyChangeListener.protected ApplicationEnginecreateNewEngine.protected abstract McreateNewModel.protected abstract WcreateNewView.getDataBush.Getter for the fieldengine.getModel()Getter for the fieldmodel.getName()Getter for the fieldname.getView()Getter for the fieldview.protected voidhandleException(Throwable exception) Called whenever the part throws an exception.voidshutdown()shutdown.
-
Field Details
-
logger
protected final org.apache.logging.log4j.Logger loggerLogger instance.
-
-
Constructor Details
-
ApplicationController
Constructs new frame. New DBInitializer is created if needed. This constructor also callsinitializeDataBush()method.- Parameters:
name- aStringobject
-
-
Method Details
-
handleException
Called whenever the part throws an exception.- Parameters:
exception- java.lang.Throwable
-
addPropertyChangeListener
addPropertyChangeListener.
- Parameters:
n- aStringobjectl- aPropertyChangeListenerobject
-
addPropertyChangeListener
addPropertyChangeListener.
- Parameters:
l- aPropertyChangeListenerobject
-
getEngine
Getter for the field
engine.- Returns:
- a
ApplicationEngineobject
-
getDataBush
getDataBush.
- Returns:
- a
DataBushobject
-
createNewEngine
createNewEngine.
- Returns:
- a
ApplicationEngineobject
-
createNewModel
createNewModel.
- Returns:
- a M object
-
getModel
Getter for the field
model.- Returns:
- a M object
-
createNewView
createNewView.
- Returns:
- a W object
-
getView
Getter for the field
view.- Returns:
- a W object
-
getName
Getter for the field
name.- Returns:
- a
Stringobject
-
shutdown
public void shutdown()shutdown.
-