|
|||||||||
| Home >> All >> org >> scopemvc >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.core
Interface Controller

- public interface Controller
Controllers arranged in a hierarchy of chains of command provide the structure of an application's logic, mirroring independent contexts of discrete Views and their bound model objects. Each context can be treated as an independent component. Application logic invoked by sending Controls into the chain executes in the context of a Controller that specifically recognises and responds to the Control by its ID.
For example, a Controller might manage a search panel (eg CustomerSearchView and bound CustomerSearchModel) that can be embedded within other arbitrary views. The search panel context has certain Controls that are recognised by the Controller which has no knowledge of anything outside the immediate context. Controls that the Controller doesn't explicitly recognise are simply passed to the parent Controller.
A Controller responds to Controls issued to it via the handleControl method from one of two places:
- Views issue Controls to indicate that the user has invoked some application logic by interacting with the user interface, eg by pressing a Button,
- Controllers pass Controls to their parent Controller to create a Chain of Command.
To implement a Controller see the basic implementation provided in BasicController
- Version:
- $Revision: 1.2 $ $Date: 2002/01/12 09:35:40 $
| Method Summary | |
java.lang.Object |
getModel()
|
Controller |
getParent()
|
Controller |
getTopParent()
Find the top-most parent Controller at the head of the chain of command. |
View |
getView()
|
void |
handleControl(Control inControl)
Respond to a Control (from either a View or a child Controller) or pass up to the parent Controller in the chain of command if the Control is not recognised in this context. |
void |
setModel(java.lang.Object inModel)
|
void |
setView(View inView)
|
| Method Detail |
getParent
public Controller getParent()
setModel
public void setModel(java.lang.Object inModel)
getModel
public java.lang.Object getModel()
setView
public void setView(View inView)
getView
public View getView()
handleControl
public void handleControl(Control inControl)
Respond to a Control (from either a View or a child Controller) or pass up to the parent Controller in the chain of command if the Control is not recognised in this context.
getTopParent
public Controller getTopParent()
- Find the top-most parent Controller at the head of the
chain of command. This is the application Controller that
initialises the rest of the Controllers as children to handle
specific areas of functionality.
|
|||||||||
| Home >> All >> org >> scopemvc >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC