本文整理匯總了Java中com.google.gwt.event.dom.client.MouseDownEvent.stopPropagation方法的典型用法代碼示例。如果您正苦於以下問題:Java MouseDownEvent.stopPropagation方法的具體用法?Java MouseDownEvent.stopPropagation怎麽用?Java MouseDownEvent.stopPropagation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.event.dom.client.MouseDownEvent
的用法示例。
在下文中一共展示了MouseDownEvent.stopPropagation方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
debug("VComboBoxMultiselect.onMouseDown(): blocking mouseDown event to avoid blur");
event.preventDefault();
event.stopPropagation();
/*
* In IE the above wont work, the blur event will still trigger. So, we
* set a flag here to prevent the next blur event from happening. This
* is not needed if do not already have focus, in that case there will
* not be any blur event and we should not cancel the next blur.
*/
if (BrowserInfo.get()
.isIE() && this.focused) {
this.preventNextBlurEventInIE = true;
debug("VComboBoxMultiselect: Going to prevent next blur event on IE");
}
}
示例2: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown( MouseDownEvent event )
{
direction = getDirection( event.getNativeEvent().getEventTarget() );
if( direction == 0 )
return;
startX = event.getScreenX();
startY = event.getScreenY();
startLeft = ResizablePanelBad.this.getAbsoluteLeft();
startTop = ResizablePanelBad.this.getAbsoluteTop();
startWidth = ResizablePanelBad.this.getOffsetWidth();
startHeight = ResizablePanelBad.this.getOffsetHeight();
DOM.setCapture( getElement() );
fResizing = true;
event.stopPropagation();
event.preventDefault();
}
示例3: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
GWT.log("onMouseDown(MouseDownEvent)");
if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
GanttWidget.this.onTouchOrMouseDown(event.getNativeEvent());
} else {
secondaryClickOnNextMouseUp = true;
new Timer() {
@Override
public void run() {
secondaryClickOnNextMouseUp = false;
}
}.schedule(CLICK_INTERVAL);
event.stopPropagation();
}
}
示例4: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
/**
* Trigger action when mouse down event fired
*
* @param event
*/
public void onMouseDown(MouseDownEvent event) {
logger.info("diagram left mouse down");
this.getWidgetPanel().getElement().focus();
if (event.getNativeButton() == NativeEvent.BUTTON_RIGHT) {
NodeShape shape = (NodeShape) getShapeUnderMouse();
if (shape instanceof OutNodeShape) {
OutNodeShape outShape = (OutNodeShape)shape;
int x = outShape.getOffsetLeft() + 2*outShape.getRadius();
int y = outShape.getOffsetTop() + 2*outShape.getRadius();
outShape.getContextMenu().setPopupPosition(x,y);
outShape.getContextMenu().show();
}
if(isvacancy){
event.stopPropagation();
event.preventDefault();
//Popup connection menu
if( !this.inShapeArea ){
final Connection c = getConnectionNearMouse();
if (c != null) {
showMenu(c);
}else{
showContextualMenu(event);
}
}
}
return;
}
if (!lockDrawConnection && inEditionToDrawConnection) {
logger.info( "draw connection lock: " + lockDrawConnection );
inDragBuildConnection = true;
inEditionToDrawConnection = false;
((NodeShape) startShape).onConnectionStart();
drawBuildArrow(startShape, getMousePoint());
}
if(!isvacancy){
event.stopPropagation();
event.preventDefault();
focusTimer.scheduleRepeating(50);
}
else {
this.clearSelectedWidgets();
selectedWidget = null;
focusTimer.scheduleRepeating(50);
}
this.setIsVacancy(true);
}
示例5: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
event.stopPropagation();
startEvent = new PressStartEvent(event);
eventBus.fireEvent(startEvent);
this.fireEvent(startEvent);
}
示例6: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
event.stopPropagation();
//event.preventDefault();
startEvent = new PressStartEvent(event);
eventBus.fireEvent(startEvent);
this.fireEvent(startEvent);
}
示例7: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public boolean onMouseDown(MouseDownEvent event, Element context) {
Element metaElement = context.getParentElement();
Element blipElement = metaElement.getParentElement();
BlipView blipView = viewProvider.asBlip(blipElement);
ConversationBlip blip = modelProvider.getBlip(blipView);
reader.read(blip);
event.stopPropagation();
return true;
}
示例8: setMousePressed
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
public void setMousePressed(JavaScriptObject aValue) {
if (mousePressed != aValue) {
if (mouseDownReg != null) {
mouseDownReg.removeHandler();
mouseDownReg = null;
}
mousePressed = aValue;
if (mousePressed != null) {
MouseDownHandler handler = new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
if (mousePressed != null) {
event.stopPropagation();
// Event.setCapture(event.getRelativeElement());
mouseState = MOUSE.PRESSED;
executeEvent(mousePressed, EventsPublisher.publish(event));
}
}
};
if (component instanceof Widget) {
mouseDownReg = ((Widget) component).addDomHandler(handler, MouseDownEvent.getType());
} else if (component instanceof HasMouseDownHandlers) {
mouseDownReg = ((HasMouseDownHandlers) component).addMouseDownHandler(handler);
}
}
}
}
示例9: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown( MouseDownEvent event )
{
if( event.getNativeEvent().getEventTarget().<Element>cast() == title )
{
isMoving = true;
movingMouseOffsetX = event.getClientX();
movingMouseOffsetY = event.getClientY();
DOM.setCapture( title );
event.preventDefault();
event.stopPropagation();
}
}
示例10: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
public void onMouseDown(MouseDownEvent event) {
dragging = true;
stretchLayout();
event.stopPropagation();
event.preventDefault();
handleY = handleDragStartY;
currentY = handleY + event.getY();
}
示例11: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
public void onMouseDown(MouseDownEvent event) {
dragging = true;
startX = event.getX();
startY = event.getY();
// Stop the event from reaching the map controller: no panning while we're dragging the rectangle.
event.stopPropagation();
}
示例12: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
clickTargetWidget = (Widget) event.getSource();
event.stopPropagation();
}
示例13: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
event.stopPropagation();
startEvent = new PressStartEvent(event);
}
示例14: onMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) {
event.stopPropagation();
}
}
示例15: handleMouseDown
import com.google.gwt.event.dom.client.MouseDownEvent; //導入方法依賴的package包/類
@UiHandler("content")
void handleMouseDown(MouseDownEvent e) {
// Prevent the editor from losing selection focus.
e.preventDefault();
e.stopPropagation();
}