|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.tgo.faces.graph.dhtml.event.IltFacesGraphInteractorActionListener
public abstract class IltFacesGraphInteractorActionListener
IltFacesGraphInteractorActionListener provides an abstract
implementation for action event listeners of the
IltFacesGraphInteractor faces component. It decodes
the client interactions into mouse events that are dispatched to the
manager view.
The client interactions consist of a mouse button press, button drag, and button release. These events are mapped into the following events:
MouseEvent.MOUSE_PRESSEDMouseEvent.MOUSE_DRAGGEDMouseEvent.MOUSE_RELEASEDThe following three mouse buttons are supported:
MouseEvent.BUTTON1MouseEvent.BUTTON2MouseEvent.BUTTON3
Note: Although BUTTON2 is supported by
this class, it is never used. The client side interactor does not submit
requests when this button is pressed.
Any of the following key modifiers are also supported:
MouseEvent.SHIFT_DOWN_MASKMouseEvent.CTRL_DOWN_MASKMouseEvent.ALT_DOWN_MASKMouseEvent.META_DOWN_MASKNote: double-click is not supported.
The following example shows how to declare this listener as the
actionListener of IltFacesGraphInteractor faces
component:
<jvtf:selectInteractor id="select"
actionEvent="#{myBean.processAction}" />
Where myBean is a subclass of
IltFacesGraphInteractorActionListener.
Subclasses should implement getViewInteractor.
This method returns the view interactor that will process the mouse events.
Other methods, such as the ones that create the mouse events, or that
dispatch them, can also be overridden as required.
| Constructor Summary | |
|---|---|
protected |
IltFacesGraphInteractorActionListener()
Creates a new IltFacesGraphInteractorActionListener instance. |
| Method Summary | |
|---|---|
protected MouseEvent |
createMouseDragged(IlvManagerView view,
int button,
int modifiers,
int releasePtX,
int releasePtY)
This method creates the MouseEvent.MOUSE_DRAGGED mouse
event that will be dispatched to the manager view. |
protected MouseEvent |
createMousePressed(IlvManagerView view,
int button,
int modifiers,
int clickPtX,
int clickPtY)
This method creates the MouseEvent.MOUSE_PRESSED mouse
event that will be dispatched to the manager view. |
protected MouseEvent |
createMouseReleased(IlvManagerView view,
int button,
int modifiers,
int releasePtX,
int releasePtY)
This method creates the MouseEvent.MOUSE_RELEASED mouse
event that will be dispatched to the manager view. |
protected void |
dispatchMouseEvent(IlvManagerView view,
MouseEvent event)
This method is called by the processAction method to
dispatch the given MouseEvent event to the manager view. |
protected abstract IlpViewInteractor |
getViewInteractor(String actionName)
This method returns the view interactor that should process the mouse events in a view. |
void |
processAction(ActionEvent event)
Called when the listener is invoked by the component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected IltFacesGraphInteractorActionListener()
IltFacesGraphInteractorActionListener instance.
| Method Detail |
|---|
protected abstract IlpViewInteractor getViewInteractor(String actionName)
actionName - The action name being processed. It is possible
to set different interactions depending on the
given action name.
null is returned.
protected MouseEvent createMousePressed(IlvManagerView view,
int button,
int modifiers,
int clickPtX,
int clickPtY)
MouseEvent.MOUSE_PRESSED mouse
event that will be dispatched to the manager view. It is called
internally by the processAction method.
view - The manager view that will process the mouse event.button - The mouse button pressed, that is, BUTTON1,
BUTTON2, or BUTTON3.modifiers - The key modifiers pressed. This can be one of the
following:
SHIFT_DOWN_MASKCTRL_DOWN_MASKALT_DOWN_MASKMETA_DOWN_MASKclickPtX - The X coordinate of the point clicked.clickPtY - The Y coordinate of the point clicked.
MouseEvent.MOUSE_PRESSED event.
protected MouseEvent createMouseDragged(IlvManagerView view,
int button,
int modifiers,
int releasePtX,
int releasePtY)
This method creates the MouseEvent.MOUSE_DRAGGED mouse
event that will be dispatched to the manager view. It is internally
called by the processAction method.
view - The manager view that will process the mouse event.button - The mouse button pressed (BUTTON1 or
BUTTON2 or BUTTON3).modifiers - The key modifiers pressed (any of
SHIFT_DOWN_MASK,
CTRL_DOWN_MASK,
ALT_DOWN_MASK or
META_DOWN_MASK).releasePtX - The X coordinate of the released point.releasePtY - The Y coordinate of the released point.
MouseEvent.MOUSE_DRAGGED event.
protected MouseEvent createMouseReleased(IlvManagerView view,
int button,
int modifiers,
int releasePtX,
int releasePtY)
This method creates the MouseEvent.MOUSE_RELEASED mouse
event that will be dispatched to the manager view. It is internally
called by the processAction method.
view - The manager view that will process the mouse event.button - The mouse button pressed (BUTTON1 or
BUTTON2 or BUTTON3).modifiers - The key modifiers pressed (any of
SHIFT_DOWN_MASK,
CTRL_DOWN_MASK,
ALT_DOWN_MASK or
META_DOWN_MASK).releasePtX - The X coordinate of the released point.releasePtY - The Y coordinate of the released point.
MouseEvent.MOUSE_RELEASED event.
protected void dispatchMouseEvent(IlvManagerView view,
MouseEvent event)
This method is called by the processAction method to
dispatch the given MouseEvent event to the manager view.
It is called three times in the following order:
MouseEvent.MOUSE_PRESSEDMouseEvent.MOUSE_DRAGGEDMouseEvent.MOUSE_RELEASED
view - The manager view where the event is dispatched to.event - The mouse event to be dispatched.public void processAction(ActionEvent event)
Subclasses must define the getViewInteractor method.
This method returns the interactor that processes mouse events.
processAction in interface ActionListenerevent - The action event containing information about the
IltFacesGraphInteractor faces component.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||