Class AbstractGenericController<M,V>
- java.lang.Object
-
- de.alpharogroup.generic.mvc.controller.AbstractGenericController<M,V>
-
- Type Parameters:
M- the generic type of the modelV- the generic type of the view
- All Implemented Interfaces:
Controller<M,V>,java.awt.event.ActionListener,java.util.EventListener
- Direct Known Subclasses:
KeypadController,LoginController
public abstract class AbstractGenericController<M,V> extends java.lang.Object implements Controller<M,V>, java.awt.event.ActionListener
The class AbstractGenericController.
-
-
Constructor Summary
Constructors Constructor Description AbstractGenericController()Instantiates a new abstract generic controller.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)(non-Javadoc).Controller<M,V>getChild(java.lang.String key)(non-Javadoc).java.util.Map<java.lang.String,Controller<M,V>>getChildren()(non-Javadoc).MgetModel()(non-Javadoc).java.lang.StringgetName()Gets the name from the Controller.Controller<M,V>getParent()(non-Javadoc).VgetView()(non-Javadoc).booleanhasChild(Controller<M,V> controller)(non-Javadoc).booleanhasChild(java.lang.String key)(non-Javadoc).protected voidinitialize()Initialize.protected voidpostinitialize()Postinitialize.protected voidpreinitialize()Preinitialize.abstract voidprocess(java.awt.event.ActionEvent event)Process.Controller<M,V>removeChild(Controller<M,V> controller)(non-Javadoc).Controller<M,V>removeChild(java.lang.String key)(non-Javadoc).java.lang.ObjectsetChild(java.lang.String key, Controller<M,V> controller)(non-Javadoc).voidsetModel(M model)(non-Javadoc).voidsetParent(Controller<M,V> controller)(non-Javadoc).voidsetView(V view)(non-Javadoc).
-
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
(non-Javadoc).- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
event- the event- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)
-
getChild
public Controller<M,V> getChild(java.lang.String key)
(non-Javadoc).- Specified by:
getChildin interfaceController<M,V>- Parameters:
key- the key- Returns:
- the child
-
getChildren
public java.util.Map<java.lang.String,Controller<M,V>> getChildren()
(non-Javadoc).- Specified by:
getChildrenin interfaceController<M,V>- Returns:
- the children
-
getModel
public M getModel()
(non-Javadoc).- Specified by:
getModelin interfaceController<M,V>- Returns:
- the model
-
getName
public java.lang.String getName()
Description copied from interface:ControllerGets the name from the Controller.- Specified by:
getNamein interfaceController<M,V>- Returns:
- the name from the Controller.
-
getParent
public Controller<M,V> getParent()
(non-Javadoc).- Specified by:
getParentin interfaceController<M,V>- Returns:
- the parent
-
getView
public V getView()
(non-Javadoc).- Specified by:
getViewin interfaceController<M,V>- Returns:
- the view
-
hasChild
public boolean hasChild(Controller<M,V> controller)
(non-Javadoc).- Specified by:
hasChildin interfaceController<M,V>- Parameters:
controller- the controller- Returns:
- true, if successful
-
hasChild
public boolean hasChild(java.lang.String key)
(non-Javadoc).- Specified by:
hasChildin interfaceController<M,V>- Parameters:
key- the key- Returns:
- true, if successful
-
initialize
protected void initialize()
Initialize.
-
postinitialize
protected void postinitialize()
Postinitialize.
-
preinitialize
protected void preinitialize()
Preinitialize.
-
process
public abstract void process(java.awt.event.ActionEvent event)
Process.- Specified by:
processin interfaceController<M,V>- Parameters:
event- the event
-
removeChild
public Controller<M,V> removeChild(Controller<M,V> controller)
(non-Javadoc).- Specified by:
removeChildin interfaceController<M,V>- Parameters:
controller- the controller- Returns:
- the controller
-
removeChild
public Controller<M,V> removeChild(java.lang.String key)
(non-Javadoc).- Specified by:
removeChildin interfaceController<M,V>- Parameters:
key- the key- Returns:
- the controller
-
setChild
public java.lang.Object setChild(java.lang.String key, Controller<M,V> controller)(non-Javadoc).- Specified by:
setChildin interfaceController<M,V>- Parameters:
key- the keycontroller- the controller- Returns:
- the object
-
setModel
public void setModel(M model)
(non-Javadoc).- Specified by:
setModelin interfaceController<M,V>- Parameters:
model- the model
-
setParent
public void setParent(Controller<M,V> controller)
(non-Javadoc).- Specified by:
setParentin interfaceController<M,V>- Parameters:
controller- the controller
-
setView
public void setView(V view)
(non-Javadoc).- Specified by:
setViewin interfaceController<M,V>- Parameters:
view- the view
-
-