Interface Controller<M,V>
-
- Type Parameters:
M- the generic type of the modelV- the generic type of the view
- All Known Implementing Classes:
AbstractGenericController,KeypadController,LoginController
public interface Controller<M,V>The Interface Controller.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Controller<M,V>getChild(java.lang.String key)Gets the child from this controller.java.util.Map<java.lang.String,Controller<M,V>>getChildren()Gets the children from this controller.MgetModel()Gets the model.java.lang.StringgetName()Gets the name from the Controller.Controller<M,V>getParent()Gets the parent from this controller.VgetView()Gets the view.booleanhasChild(Controller<M,V> controller)Checks for child.booleanhasChild(java.lang.String key)Checks for child.voidprocess(java.awt.event.ActionEvent event)Process.Controller<M,V>removeChild(Controller<M,V> controller)Removes the child.Controller<M,V>removeChild(java.lang.String key)Removes the child.java.lang.ObjectsetChild(java.lang.String key, Controller<M,V> controller)Sets a child from this controller.voidsetModel(M model)Sets the model.voidsetParent(Controller<M,V> controller)Sets the parent.voidsetView(V view)Sets the view.
-
-
-
Method Detail
-
getChild
Controller<M,V> getChild(java.lang.String key)
Gets the child from this controller.- Parameters:
key- the key- Returns:
- the child or null.
-
getChildren
java.util.Map<java.lang.String,Controller<M,V>> getChildren()
Gets the children from this controller.- Returns:
- the children
-
getModel
M getModel()
Gets the model.- Returns:
- the model
-
getName
java.lang.String getName()
Gets the name from the Controller.- Returns:
- the name from the Controller.
-
getParent
Controller<M,V> getParent()
Gets the parent from this controller.- Returns:
- the parent or null.
-
getView
V getView()
Gets the view.- Returns:
- the view
-
hasChild
boolean hasChild(Controller<M,V> controller)
Checks for child.- Parameters:
controller- the controller- Returns:
- true, if successful
-
hasChild
boolean hasChild(java.lang.String key)
Checks for child.- Parameters:
key- the key- Returns:
- true, if successful
-
process
void process(java.awt.event.ActionEvent event)
Process.- Parameters:
event- the event
-
removeChild
Controller<M,V> removeChild(Controller<M,V> controller)
Removes the child.- Parameters:
controller- the controller- Returns:
- the controller
-
removeChild
Controller<M,V> removeChild(java.lang.String key)
Removes the child.- Parameters:
key- the key from the controller- Returns:
- the controller
-
setChild
java.lang.Object setChild(java.lang.String key, Controller<M,V> controller)Sets a child from this controller.- Parameters:
key- the keycontroller- the controller- Returns:
- the object
-
setModel
void setModel(M model)
Sets the model.- Parameters:
model- the new model
-
setParent
void setParent(Controller<M,V> controller)
Sets the parent.- Parameters:
controller- the new parent
-
setView
void setView(V view)
Sets the view.- Parameters:
view- the new view
-
-