Package snap.view
Class EventDispatcher
java.lang.Object
snap.view.EventDispatcher
A class to help RootView dispatch events to Views.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEventDispatcher
(WindowView aWin) Creates a new EventDispatcher for given Window. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchActionEvent
(ViewEvent anEvent) Dispatch Action event.void
dispatchDragSourceEvent
(ViewEvent anEvent) Dispatch drag gesture event.void
dispatchDragTargetEvent
(ViewEvent anEvent) Dispatch drag target event.void
dispatchEvent
(ViewEvent anEvent) Dispatch event.void
dispatchKeyEvent
(ViewEvent anEvent) Dispatch key event.void
dispatchMouseEvent
(ViewEvent anEvent) Dispatch Mouse event.void
Dispatch MouseMove event to trigger exit.static ViewEvent
Returns the last MouseDown event.Returns the last mouse pressed view.getPopup()
Returns the popup window, if one was added to root view during last event.static boolean
Returns whether mouse is down.boolean
isMouseDown
(View aView) Returns whether given view is currently in mouse press.static boolean
Returns whether mouse is being dragged.boolean
isMouseOver
(View aView) Returns whether given view is current under the mouse.protected void
setPopup
(PopupWindow aPopup) Sets the popup window, if one added to this root view during last event.
-
Field Details
-
_mouseOvers
-
_mouseOverView
-
-
Constructor Details
-
EventDispatcher
Creates a new EventDispatcher for given Window.
-
-
Method Details
-
isMouseDown
public static boolean isMouseDown()Returns whether mouse is down. -
isMouseDrag
public static boolean isMouseDrag()Returns whether mouse is being dragged. -
getLastMouseDown
Returns the last MouseDown event. -
getMousePressView
Returns the last mouse pressed view. -
getPopup
Returns the popup window, if one was added to root view during last event. -
setPopup
Sets the popup window, if one added to this root view during last event. -
dispatchEvent
Dispatch event. -
dispatchMouseEvent
Dispatch Mouse event. -
dispatchKeyEvent
Dispatch key event. -
dispatchActionEvent
Dispatch Action event. -
dispatchDragSourceEvent
Dispatch drag gesture event. -
dispatchDragTargetEvent
Dispatch drag target event. -
dispatchMouseMoveOutsideWindow
public void dispatchMouseMoveOutsideWindow()Dispatch MouseMove event to trigger exit. -
isMouseOver
Returns whether given view is current under the mouse. -
isMouseDown
Returns whether given view is currently in mouse press.
-