java.lang.Object
de.grogra.imp.viewhandler.ViewEventHandler
- All Implemented Interfaces:
Disposable
,EventListener
,EventListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.util.EventListener
EventListener.Bicast, EventListener.Multicaster
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ClickEvent
createClickEvent
(MouseEvent event) protected abstract DragEvent
createDragEvent
(MouseEvent event) void
dispose()
void
void
If Normal -> possible to start an event (tool, nav, selection) Once an event is activated, it is consumed.int
getPick()
getPicked
(int index) getPickedAt
(int shift) Add the possible shift from the highlightergetPickedTool
(int index) int
final View
getView()
abstract ViewEventFactory
static boolean
hasListener
(Path p) boolean
boolean
This is faster that picking for real.boolean
Visiting the graph for tool is way faster that visiting the complete graphvoid
pick
(int x, int y) void
void
pickTool
(int x, int y) void
static void
send
(EventObject e, Path p) void
void
-
Constructor Details
-
ViewEventHandler
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfaceDisposable
-
eventOccured
If Normal -> possible to start an event (tool, nav, selection) Once an event is activated, it is consumed. Thus, the order in NORMAL matters. Else -> continue the current event- Specified by:
eventOccured
in interfaceEventListener
- Parameters:
e
- an event
-
getView
-
disposeEvent
-
getViewEventFactory
-
isMouseOnTool
Visiting the graph for tool is way faster that visiting the complete graph- Parameters:
e
-- Returns:
-
isMouseOnSelected
This is faster that picking for real. As it only test on one path- Parameters:
e
-- Returns:
-
isMouseOnNode
-
send
-
hasListener
-
pick
public void pick(int x, int y) -
pick
-
setPick
-
pickTool
public void pickTool(int x, int y) -
getPicked
-
getPickedAt
Add the possible shift from the highlighter -
getPickedTool
-
getPickSize
public int getPickSize() -
getPick
-
getLastSelected
-
setLastSelected
-
selectFromEvent
-
getHighlightedIndex
public int getHighlightedIndex() -
createClickEvent
-
createDragEvent
-