|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.graphic.IlpAbstractGraphicController
public abstract class IlpAbstractGraphicController
This class is part of the MVC trio and is responsible for storing and setting the interactors to the view and graphics. It is also responsible for creating or retrieving the graphic view configuration and setting it in the graphic view.
| Field Summary | |
|---|---|
protected WeakReference |
lastInteractedObject
The object interaction state used for the last interacted object. |
protected WeakHashMap |
lastInteractionStates
|
| Constructor Summary | |
|---|---|
IlpAbstractGraphicController(IlpContext context)
Creates a controller. |
|
| Method Summary | |
|---|---|
void |
attach(IlpGraphicView v)
Attaches a controller to a given view. |
protected void |
attachView(IlpGraphicView view)
|
protected IlpGraphicViewStyleManager |
createGraphicViewStyleManager(IlpContext context,
IlpGraphicView view)
Creates the graphic view style manager, either by retrieving it from an XML file or any other storage, or simply by creating an empty instance. |
protected IlpViewInteractionContext |
createViewInteractionContext(IlpGraphicView view)
Returns a new view interaction context for the given view. |
void |
detach()
Detaches a controller from its view. |
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
IlpObjectInteractor |
getCompleteObjectInteractor(IlpRepresentationObject object)
Returns the interactor responsible for handling events on the given object in the graphic view controlled by this instance. |
IlpContext |
getContext()
Returns the context used by the interaction with the graphic view. |
IlpInteractorManager |
getDefaultInteractorManager()
Gets the default interactor manager. |
IlpViewInteractor |
getDefaultViewInteractor()
Returns the default view interactor. |
Component |
getFocusEventComponent()
Returns the component, closely related to the view, whose focus events shall be forwarded to the interactor. |
Component |
getKeyEventComponent()
Returns the component, closely related to the view, whose key events shall be forwarded to the interactor. |
Component |
getMouseEventComponent()
Returns the component, closely related to the view, whose mouse events shall be forwarded to the interactor. |
IlpInteractionState |
getObjectInteractionState(IlpObjectInteractor ointeractor,
IlpObjectInteractionContext ctxt)
Looks up the interaction state corresponding to the given context used by object interaction. |
IlpObjectInteractor |
getObjectInteractor(IlpObject object)
Returns the interactor associated with the given business object in the graphic view controlled by this instance. |
IlpObjectInteractor |
getObjectInteractor(IlpObject object,
IlpAttribute attribute)
Returns the interactor associated with the given business object and the given attribute in the graphic view controlled by this instance. |
IlpObjectInteractor |
getObjectInteractor(IlpRepresentationObject object)
Returns the interactor associated with the given object in the graphic view controlled by this instance. |
IlpObjectInteractor |
getObjectInteractor(IlpRepresentationObject object,
IlpAttribute attribute)
Returns the interactor associated with the given object and the given attribute in the graphic view controlled by this instance. |
IlpObjectInteractor |
getObjectInteractor(Object key)
Returns the interactor associated with the given key in the graphic view controlled by this instance. |
IlpGraphicView |
getView()
Returns the view that is being controlled. |
IlpViewInteractionContext |
getViewInteractionContext()
Returns the view interaction context. |
IlpViewInteractor |
getViewInteractor()
Returns the interactor associated with the view. |
protected void |
initGraphicViewStyleManager(IlpContext context,
IlpGraphicView view)
Creates the graphic view style manager, either retrieving the configuration from an XML file or any other storage, or simply creating an empty instance; and initializes the view with it. |
protected void |
initInteractorManager(IlpContext context)
Returns the default interactor manager from the context. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
removeObjectInteractors()
Remove all the interactors associated with representation objects. |
void |
removeObjectInteractors(IlpObject object)
Removes all the interactors associated with the given business object. |
void |
removeObjectInteractors(IlpRepresentationObject object)
Removes all the interactors associated with the given object. |
void |
setDefaultInteractorManager(IlpInteractorManager defaultManager)
Sets the default interactor manager. |
void |
setDefaultViewInteractor(IlpViewInteractor interactor)
Sets the default view interactor. |
void |
setObjectInteractor(IlpObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
Sets the interactor associated with the given business object and attribute. |
void |
setObjectInteractor(IlpObject object,
IlpObjectInteractor interactor)
Sets the interactor associated with the given business object. |
void |
setObjectInteractor(IlpRepresentationObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object and attribute. |
void |
setObjectInteractor(IlpRepresentationObject object,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object. |
void |
setObjectInteractor(Object key,
IlpObjectInteractor interactor)
Sets the interactor associated with the given key. |
void |
setViewInteractor(IlpViewInteractor interactor)
Sets the interactor associated with the view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected WeakReference lastInteractedObject
protected WeakHashMap lastInteractionStates
| Constructor Detail |
|---|
public IlpAbstractGraphicController(IlpContext context)
setController on the view.
IllegalArgumentException - if the given context is equal to
null.| Method Detail |
|---|
public Component getMouseEventComponent()
public Component getKeyEventComponent()
public Component getFocusEventComponent()
public IlpContext getContext()
getContext in interface IlpGraphicControllerpublic IlpGraphicView getView()
getView in interface IlpGraphicControllerpublic IlpViewInteractor getViewInteractor()
getViewInteractor in interface IlpGraphicControllerpublic void setViewInteractor(IlpViewInteractor interactor)
setViewInteractor in interface IlpGraphicControllerpublic IlpViewInteractor getDefaultViewInteractor()
getDefaultViewInteractor in interface IlpGraphicControllerpublic void setDefaultViewInteractor(IlpViewInteractor interactor)
Note: Setting the default view interactor does not change the currently active view interactor immediately. It has an effect on the view interactor only the next time an interactor detaches itself.
setViewInteractor(ilog.cpl.interactor.IlpViewInteractor)public void setDefaultInteractorManager(IlpInteractorManager defaultManager)
The default interactor manager is used to retrieve interactor information, when it cannot be found in this graphic controller.
public IlpInteractorManager getDefaultInteractorManager()
The default manager is used to retrieve interactor information, when it cannot be found in this controller.
By default, the default interactor manager is defined in the application context used to create the graphic controller instance.
public void attach(IlpGraphicView v)
attach in interface IlpGraphicControllerIllegalStateException - if the controller is already attached to a
graphic view.protected void attachView(IlpGraphicView view)
public void detach()
detach in interface IlpGraphicControllerpublic final IlpViewInteractionContext getViewInteractionContext()
public IlpInteractionState getObjectInteractionState(IlpObjectInteractor ointeractor,
IlpObjectInteractionContext ctxt)
ointeractor - The object interactor.ctxt - The context where the event occurred.
protected void initGraphicViewStyleManager(IlpContext context,
IlpGraphicView view)
protected IlpGraphicViewStyleManager createGraphicViewStyleManager(IlpContext context,
IlpGraphicView view)
IlpDefaultGraphicViewStyleManagerprotected IlpViewInteractionContext createViewInteractionContext(IlpGraphicView view)
view - The view for which to create a view interaction context.protected void initInteractorManager(IlpContext context)
public IlpObjectInteractor getObjectInteractor(Object key)
getObjectInteractor in interface IlpInteractorManagerpublic IlpObjectInteractor getObjectInteractor(IlpRepresentationObject object)
getObjectInteractor in interface IlpInteractorManager
public IlpObjectInteractor getObjectInteractor(IlpRepresentationObject object,
IlpAttribute attribute)
getObjectInteractor in interface IlpInteractorManagerpublic IlpObjectInteractor getObjectInteractor(IlpObject object)
getObjectInteractor in interface IlpInteractorManager
public IlpObjectInteractor getObjectInteractor(IlpObject object,
IlpAttribute attribute)
getObjectInteractor in interface IlpInteractorManager
public void setObjectInteractor(Object key,
IlpObjectInteractor interactor)
setObjectInteractor in interface IlpMutableInteractorManager
public void setObjectInteractor(IlpRepresentationObject object,
IlpObjectInteractor interactor)
setObjectInteractor in interface IlpMutableInteractorManager
public void setObjectInteractor(IlpRepresentationObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
setObjectInteractor in interface IlpMutableInteractorManager
public void setObjectInteractor(IlpObject object,
IlpObjectInteractor interactor)
setObjectInteractor in interface IlpMutableInteractorManager
public void setObjectInteractor(IlpObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
setObjectInteractor in interface IlpMutableInteractorManagerpublic void removeObjectInteractors(IlpRepresentationObject object)
removeObjectInteractors in interface IlpMutableInteractorManagerpublic void removeObjectInteractors(IlpObject object)
removeObjectInteractors in interface IlpMutableInteractorManagerpublic void removeObjectInteractors()
removeObjectInteractors in interface IlpMutableInteractorManagerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void keyTyped(KeyEvent e)
keyTyped in interface KeyListenerpublic void keyPressed(KeyEvent e)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic IlpObjectInteractor getCompleteObjectInteractor(IlpRepresentationObject object)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||