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 ClickEventcreateClickEvent(MouseEvent event) protected abstract DragEventcreateDragEvent(MouseEvent event) voiddispose()voidvoidIf Normal -> possible to start an event (tool, nav, selection) Once an event is activated, it is consumed.intgetPick()getPicked(int index) getPickedAt(int shift) Add the possible shift from the highlightergetPickedTool(int index) intfinal ViewgetView()abstract ViewEventFactorystatic booleanhasListener(Path p) booleanisKeyPressed(int code) booleanbooleanThis is faster that picking for real.booleanVisiting the graph for tool is way faster that visiting the complete graphvoidpick(int x, int y) voidvoidpickTool(int x, int y) protected voidvoidstatic voidsend(EventObject e, Path p) voidvoid
-
Constructor Details
-
ViewEventHandler
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceDisposable
-
registerKeyEvent
-
isKeyPressed
public boolean isKeyPressed(int code) -
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:
eventOccuredin 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
-