本文整理了Java中com.google.gwt.user.client.Event.stopPropagation()
方法的一些代码示例,展示了Event.stopPropagation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.stopPropagation()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Event
类名称:Event
方法名:stopPropagation
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
private void eatEvent(Event event) {
event.stopPropagation();
event.preventDefault();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private static void dispatchCapturedMouseEvent(Event evt) {
boolean cancelled = !DOM.previewEvent(evt);
if (cancelled || captureElem == null) {
return;
}
if (DOM.dispatchEvent(evt, captureElem)) {
evt.stopPropagation();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* This method is called directly by native code when event preview is being
* used.
*
* @param evt a handle to the event being previewed
* @return <code>false</code> to cancel the event
*/
public static boolean previewEvent(Event evt) {
// Fire a NativePreviewEvent to NativePreviewHandlers
boolean ret = Event.fireNativePreviewEvent(evt);
// If the preview cancels the event, stop it from bubbling and performing
// its default action. Check for a null evt to allow unit tests to run.
if (!ret && evt != null) {
evt.stopPropagation();
evt.preventDefault();
}
return ret;
}
代码示例来源:origin: pt.ist/svgwt
/****************************************************/
/*
@Override
public SVGComponent getSource() {
return (SVGComponent)super.getSource();
}
*/
@Override
public void consume() {
super.consume();
_event.stopPropagation();
}
代码示例来源:origin: net.wetheinter/gwt-user
private static void dispatchCapturedMouseEvent(Event evt) {
boolean cancelled = !DOM.previewEvent(evt);
if (cancelled || captureElem == null) {
return;
}
if (DOM.dispatchEvent(evt, captureElem)) {
evt.stopPropagation();
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void onBrowserEvent(com.google.gwt.user.client.Event event) {
if (com.google.gwt.user.client.Event.ONCONTEXTMENU == event.getTypeInt()) {
event.stopPropagation();
event.preventDefault();
}
}
});
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
@Override
protected boolean handleCloseEvent(Grid.EditorDomEvent<T> event) {
boolean result = super.handleCloseEvent(event);
if (result) {
event.getDomEvent().stopPropagation();
}
return result;
}
}
代码示例来源:origin: org.vaadin.addons/aceeditor
@Override
public void onBrowserEvent(Event event) {
if (event.getTypeInt() == Event.ONCONTEXTMENU) {
event.stopPropagation();
event.preventDefault();
return;
}
super.onBrowserEvent(event);
}
代码示例来源:origin: fr.lteconsulting/hexa.core
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
int nextPos = currentPosition + nbPerPage;
if( callback != null )
callback.onPagerWant( nextPos, nextPos + nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: ltearno/hexa.tools
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
if( callback != null )
callback.onPagerWant( 0, nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: ltearno/hexa.tools
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
int nextPos = currentPosition - nbPerPage;
if( callback != null )
callback.onPagerWant( nextPos, nextPos + nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: ltearno/hexa.tools
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
int nextPos = lastPosition - (lastPosition % nbPerPage);
if( callback != null )
callback.onPagerWant( nextPos, nextPos + nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: com.google.gwt/gwt-servlet
case Event.ONKEYUP: {
if (KeyCodes.isArrowKey(event.getKeyCode())) {
event.stopPropagation();
event.preventDefault();
return;
代码示例来源:origin: fr.lteconsulting/hexa.core
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
if( callback != null )
callback.onPagerWant( 0, nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: fr.lteconsulting/hexa.core
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
int nextPos = currentPosition - nbPerPage;
if( callback != null )
callback.onPagerWant( nextPos, nextPos + nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: fr.lteconsulting/hexa.core
@Override
public void onBrowserEvent( Event event )
{
if( event.getTypeInt() != Event.ONCLICK )
return;
int nextPos = lastPosition - (lastPosition % nbPerPage);
if( callback != null )
callback.onPagerWant( nextPos, nextPos + nbPerPage - 1 );
event.preventDefault();
event.stopPropagation();
}
};
代码示例来源:origin: dennisjzh/GwtMobile-UI
public void onMouseMove(Event e) {
e.preventDefault();
e.stopPropagation();
onMove(e, new Point(e.getClientX(), e.getClientY()));
}
代码示例来源:origin: ArcBees/gwtchosen
private void choiceDestroyLinkClick(Event e) {
e.preventDefault();
if (!isDisabled()) {
pendingDestroyClick = true;
Element target = e.getEventTarget().cast();
choiceDestroy($(target));
} else {
e.stopPropagation();
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
event.stopPropagation();
return;
代码示例来源:origin: com.arcbees/gwtchosen
private void choiceDestroyLinkClick(Event e) {
e.preventDefault();
if (!isDisabled()) {
pendingDestroyClick = true;
Element target = e.getEventTarget().cast();
choiceDestroy($(target));
} else {
e.stopPropagation();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!