Package org.scictrl.mp.orbitcorrect.mvc
Class ApplicationView<C extends ApplicationController<?,?>,AC extends ApplicationView<?,?,?>.Actions,CO extends ApplicationView<?,?,?>.Components>
java.lang.Object
org.scictrl.mp.orbitcorrect.mvc.ApplicationView<C,AC,CO>
- Type Parameters:
C
-ApplicationController
implementation typeAC
-ApplicationView.Actions
implementation typeCO
-ApplicationView.Components
implementation type
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
public abstract class ApplicationView<C extends ApplicationController<?,?>,AC extends ApplicationView<?,?,?>.Actions,CO extends ApplicationView<?,?,?>.Components>
extends Object
implements PropertyChangeListener
View for the application. It provides lazy initiallization pattern for two groups of classes:
Swing actions and Swing components.
IT must listen to data model.
- Author:
- igor@scictrl.com
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Actions should be used in components.class
The Swing components. -
Field Summary
Modifier and TypeFieldDescriptionActions handler.Components hodler.Controller -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Handle model and controller updates by updating GUI.protected abstract void
handleSetVisible
(boolean visible) handleSetVisible.void
initialize
(ApplicationController<?, ?> controller) initialize.protected abstract AC
newActions.protected abstract CO
newComponents.void
void
setVisible
(boolean visible) setVisible.
-
Field Details
-
actions
Actions handler. -
components
Components hodler. -
controller
Controller
-
-
Constructor Details
-
ApplicationView
public ApplicationView()Constructor for ApplicationView.
-
-
Method Details
-
initialize
initialize.
- Parameters:
controller
- aApplicationController
object
-
newActions
newActions.
- Returns:
- a AC object
-
newComponents
newComponents.
- Returns:
- a CO object
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
setVisible
public void setVisible(boolean visible) setVisible.
- Parameters:
visible
- a boolean
-
handlePropertyChange
Handle model and controller updates by updating GUI.- Parameters:
evt
- aPropertyChangeEvent
object
-
handleSetVisible
protected abstract void handleSetVisible(boolean visible) handleSetVisible.
- Parameters:
visible
- a boolean
-