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
-ApplicationModel
implementation typeW
-ApplicationView
implementation 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
Modifier and TypeFieldDescriptionprotected final org.apache.logging.log4j.Logger
Logger instance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener.void
addPropertyChangeListener.protected ApplicationEngine
createNewEngine.protected abstract M
createNewModel.protected abstract W
createNewView.getDataBush.Getter for the fieldengine
.getModel()
Getter for the fieldmodel
.getName()
Getter for the fieldname
.getView()
Getter for the fieldview
.protected void
handleException
(Throwable exception) Called whenever the part throws an exception.void
shutdown()
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
- aString
object
-
-
Method Details
-
handleException
Called whenever the part throws an exception.- Parameters:
exception
- java.lang.Throwable
-
addPropertyChangeListener
addPropertyChangeListener.
- Parameters:
n
- aString
objectl
- aPropertyChangeListener
object
-
addPropertyChangeListener
addPropertyChangeListener.
- Parameters:
l
- aPropertyChangeListener
object
-
getEngine
Getter for the field
engine
.- Returns:
- a
ApplicationEngine
object
-
getDataBush
getDataBush.
- Returns:
- a
DataBush
object
-
createNewEngine
createNewEngine.
- Returns:
- a
ApplicationEngine
object
-
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
String
object
-
shutdown
public void shutdown()shutdown.
-