Package com.jadice.web.util.gwt.client
Class KeyDownEventDispatchingUtil
java.lang.Object
com.jadice.web.util.gwt.client.KeyDownEventDispatchingUtil
Delivers key down events from a single source widget to an arbitrary number of target widgets.
Especially used to support keyboard shortcuts.
The event target of a key event is the currently focused element which is processing the keyboard
activity. If no suitable element is in focus, the event target will be the HTML body element if
available, otherwise the root element. To guarantee that events are properly delivered the
RootPanel
should be supplied as source widget.
For further details see:
http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboard-event-order
*
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
dispatch
(com.google.gwt.user.client.ui.IsWidget source, com.google.gwt.user.client.ui.IsWidget... children) Dispatch the events received on the givenIsWidget
source
to the specifiedwidgets
.static <T extends com.google.gwt.user.client.ui.IsWidget & com.google.gwt.user.client.ui.IndexedPanel>
voiddispatchPanel
(T source) Dispatch the events received on the givenIsWidget
source
to all child widgets of thesource
.static <T> void
dispatchTo
(com.google.gwt.user.client.ui.IsWidget source, KeyDownEventDispatchingUtil.HasChildren<T> children) Dispatch the events received on the givenIsWidget
source
to an implementation ofKeyDownEventDispatchingUtil.HasChildren
.
-
Constructor Details
-
KeyDownEventDispatchingUtil
public KeyDownEventDispatchingUtil()
-
-
Method Details
-
dispatch
public static void dispatch(com.google.gwt.user.client.ui.IsWidget source, com.google.gwt.user.client.ui.IsWidget... children) Dispatch the events received on the givenIsWidget
source
to the specifiedwidgets
.- Parameters:
source
- the source of the Eventchildren
- thewidgets
that shall receive the events.
-
dispatchPanel
public static <T extends com.google.gwt.user.client.ui.IsWidget & com.google.gwt.user.client.ui.IndexedPanel> void dispatchPanel(T source) Dispatch the events received on the givenIsWidget
source
to all child widgets of thesource
.- Type Parameters:
T
- the receiving widget.- Parameters:
source
- the source of the Event
-
dispatchTo
public static <T> void dispatchTo(com.google.gwt.user.client.ui.IsWidget source, KeyDownEventDispatchingUtil.HasChildren<T> children) Dispatch the events received on the givenIsWidget
source
to an implementation ofKeyDownEventDispatchingUtil.HasChildren
.- Type Parameters:
T
- the children type- Parameters:
source
- the source of the Eventchildren
- aKeyDownEventDispatchingUtil.HasChildren
implementation
-