|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.maryanovsky.gwtutils.client.ui.EventCancellingPanel
public class EventCancellingPanel
A panel which allows cancelling the bubbling of and preventing the default action from occurring on a specified set of events it receives.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
HasWidgets.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
EventCancellingPanel()
Creates a new EventCancellingPanel . |
|
EventCancellingPanel(Widget child,
int cancelBubbleEventsMask,
int preventDefaultEventsMask)
Creates a new EventCancellingPanel with the specified child
widget and which will cancel the bubbling of events matching the first
specified mask and prevent the default action for events matching the
second specified mask. |
Method Summary | |
---|---|
int |
getCancelBubbleEventsMask()
Returns the bitmask of events whose bubbling we are currently cancelling. |
int |
getPreventDefaultEventsMask()
Returns the bitmask of events for which we prevent the default action. |
protected boolean |
isCancelBubbling(Event event)
Returns whether we should cancel the bubbling of the the specified event. |
protected boolean |
isPreventDefault(Event event)
Returns whether we should prevent the default action for the specified event. |
void |
onBrowserEvent(Event event)
Cancels the bubbling of and/or prevents the default action of the specified event. |
void |
setCancelBubbleEventsMask(int cancelBubbleEventsMask)
Sets the bitmask of events whose bubbling to cancel. |
void |
setPreventDefaultEventsMask(int preventDefaultEventsMask)
Sets the bitmask of events for which we prevent the default action. |
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
---|
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventCancellingPanel(Widget child, int cancelBubbleEventsMask, int preventDefaultEventsMask)
EventCancellingPanel
with the specified child
widget and which will cancel the bubbling of events matching the first
specified mask and prevent the default action for events matching the
second specified mask.
public EventCancellingPanel()
EventCancellingPanel
.
Method Detail |
---|
public void setCancelBubbleEventsMask(int cancelBubbleEventsMask)
public int getCancelBubbleEventsMask()
public void setPreventDefaultEventsMask(int preventDefaultEventsMask)
public int getPreventDefaultEventsMask()
protected boolean isCancelBubbling(Event event)
protected boolean isPreventDefault(Event event)
public void onBrowserEvent(Event event)
onBrowserEvent
in interface EventListener
onBrowserEvent
in class Widget
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |