public abstract class AbstractController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
Constructor and Description |
---|
AbstractController() |
Modifier and Type | Method and Description |
---|---|
void |
createChildTriad(AbstractModel childModel,
AbstractView childView,
AbstractController childController)
Creates a child triad.
|
void |
createChildTriad(AbstractModel childModel,
AbstractView childView,
AbstractController childController,
java.lang.String identifier)
Creates a child triad.
|
void |
createChildTriad(AbstractView childView,
AbstractController childController)
Creates a child triad (or, ahem, diad), sans the model.
|
AbstractController |
getChildController(java.lang.String identifier)
Gets a child controller associated with this controller.
|
java.util.Iterator<AbstractController> |
getChildControllersIterator()
Gets an
Enumeration over which the child controllers
held by this controller can be enumerated. |
protected java.lang.String |
getIdentifier()
Gets the identifier of the controller.
|
AbstractModel |
getModel()
Gets the model associated with this controller.
|
int |
getNumChildControllers()
Gets the number of child controllers
|
AbstractController |
getParentController()
Gets the parent controller of this controller.
|
AbstractView |
getView()
Gets the view associated with this controller.
|
abstract void |
handleAppEvent(AppEvent evt)
Allows the controller to handle AppEvents.
|
void |
removeAllChildControllers()
Removes all child controllers.
|
void |
removeChildController(java.lang.String id)
Removes a child controller from those associated with this controller.
|
protected void |
setIdentifier(java.lang.String identifier)
Sets the identifier of the controller.
|
void |
setModel(AbstractModel model)
Sets the model associated with this controller.
|
void |
setParentController(AbstractController ctrl)
Sets the parent controller of this controller.
|
void |
setView(AbstractView view)
Sets the view associated with this controller.
|
public void createChildTriad(AbstractModel childModel, AbstractView childView, AbstractController childController, java.lang.String identifier)
childModel
- The model in the triad.childView
- The view in the triad.childController
- The controller in the triad.identifier
- A String
used to identify the triad.public void createChildTriad(AbstractModel childModel, AbstractView childView, AbstractController childController)
childModel
- The model in the triad.childView
- The view in the triad.childController
- The controller in the triad.public void createChildTriad(AbstractView childView, AbstractController childController)
childView
- The view in the triad.childController
- The controller in the triad.public AbstractController getChildController(java.lang.String identifier)
identifier
- The identifier associated with the desired child
controller.public void setParentController(AbstractController ctrl)
ctrl
- The controller to act as the parent.public AbstractController getParentController()
protected java.lang.String getIdentifier()
protected void setIdentifier(java.lang.String identifier)
identifier
- The identifier.public void setModel(AbstractModel model)
model
- The model.public AbstractModel getModel()
public void setView(AbstractView view)
view
- The view.public AbstractView getView()
public abstract void handleAppEvent(AppEvent evt)
evt
- The AppEvent to handle.public int getNumChildControllers()
public java.util.Iterator<AbstractController> getChildControllersIterator()
Enumeration
over which the child controllers
held by this controller can be enumerated.Enumeration
pointing to AbstractController
objects.public void removeChildController(java.lang.String id)
id
- The id of the child controller to remove.public void removeAllChildControllers()