|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.AbstractMouseInputEditor
y.view.MultiplexingNodeEditor.EventReporter
public static class MultiplexingNodeEditor.EventReporter
Editor that plays recorded MouseEvents back to a
parent EditMode instance for further processing.
This is useful to enable e.g. EditMode's default handling
for right mouse-clicks to trigger PopupMode even though
the event coordinates would qualify as a valid starting point in the
EditMode's MouseInputMode instance.
By default, drag events and click events for all but the left mouse button trigger play back of recorded events.
| Constructor Summary | |
|---|---|
MultiplexingNodeEditor.EventReporter()
Initializes a new event reporter. |
|
| Method Summary | |
|---|---|
protected boolean |
checkEvent(Mouse2DEvent event)
Returns true if the specified event should trigger event
play back and false otherwise. |
Cursor |
getCursor(Mouse2DEvent event)
Returns a mouse cursor to indicate what action this event could trigger or
null if the editor does not want to initiate a cursor change. |
boolean |
isValidStartPosition(double x,
double y)
Determines if the input mode could start editing at the given position. |
void |
mouse2DEventHappened(Mouse2DEvent event)
Listener-like interface that will be notified of Mouse2DEvents. |
protected void |
reportEvent(Mouse2DEvent event)
Plays the recorded events back to the parent EditMode of
the specified event's dispatcher MouseInputMode. |
void |
setContext(Graph2DView view,
MultiplexingNodeEditor parent,
NodeRealizer realizer)
Provides context information for the editor. |
boolean |
startsEditing(Mouse2DEvent event)
This method is used by clients to query whether the given event is deemed as a starting gesture. |
| Methods inherited from class y.view.AbstractMouseInputEditor |
|---|
addChangeListener, fireStateChanged, isEditing, isEnabled, isInterestedInEvents, removeChangeListener, setEnabled, startEditing, stopEditing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface y.view.MouseInputEditor |
|---|
addChangeListener, isEditing, isInterestedInEvents, removeChangeListener, startEditing, stopEditing |
| Constructor Detail |
|---|
public MultiplexingNodeEditor.EventReporter()
| Method Detail |
|---|
protected boolean checkEvent(Mouse2DEvent event)
true if the specified event should trigger event
play back and false otherwise.
The default implementation returns true for mouse drag
events and mouse click events of all but the left mouse button.
event - the event to check.
true if the specified event should trigger event
play back and false otherwise.public boolean startsEditing(Mouse2DEvent event)
MouseInputEditor
startsEditing in interface MouseInputEditorevent - the event that happened
MouseInputEditor.isInterestedInEvents()public void mouse2DEventHappened(Mouse2DEvent event)
MouseInputEditor
mouse2DEventHappened in interface MouseInputEditorevent - the event that happenedMouseInputEditor.isInterestedInEvents()
public void setContext(Graph2DView view,
MultiplexingNodeEditor parent,
NodeRealizer realizer)
MultiplexingNodeEditor.NodeEditor
setContext in interface MultiplexingNodeEditor.NodeEditorview - the current view in which the editing is done.parent - the multiplexing editor that delegates to the node editor.realizer - the realizer representing the node to edit.
public boolean isValidStartPosition(double x,
double y)
MultiplexingNodeEditor.NodeEditorMultiplexingNodeEditor instance is able to handle
mouse gestures at the specified position.
isValidStartPosition in interface MultiplexingNodeEditor.NodeEditorx - The horizontal position.y - The vertical position.
true if the input mode could start editing at the
given position; false otherwise.public Cursor getCursor(Mouse2DEvent event)
MultiplexingNodeEditor.NodeEditorevent could trigger or
null if the editor does not want to initiate a cursor change.
getCursor in interface MultiplexingNodeEditor.NodeEditorevent - The mouse event a cursor can be returned for.
Cursor if a possible action for this mouse event
shall be indicated or null.protected void reportEvent(Mouse2DEvent event)
EditMode of
the specified event's dispatcher MouseInputMode.
event - the event that triggered play back.Mouse2DEvent.getDispatcher()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||