Java Code Examples for com.google.gwt.event.dom.client.MouseDownEvent#stopPropagation()
The following examples show how to use
com.google.gwt.event.dom.client.MouseDownEvent#stopPropagation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 6 votes |
@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"); } }
Example 2
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 6 votes |
@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"); } }
Example 3
Source File: GanttWidget.java From gantt with Apache License 2.0 | 6 votes |
@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(); } }
Example 4
Source File: DiagramController.java From EasyML with Apache License 2.0 | 4 votes |
/** * 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); }
Example 5
Source File: DateCellContainer.java From calendar-component with Apache License 2.0 | 4 votes |
@Override public void onMouseDown(MouseDownEvent event) { clickTargetWidget = (Widget) event.getSource(); event.stopPropagation(); }
Example 6
Source File: EventDispatcherPanel.java From swellrt with Apache License 2.0 | 4 votes |
@Override public void onMouseDown(MouseDownEvent event) { if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) { event.stopPropagation(); } }
Example 7
Source File: VerticalToolbarButtonWidget.java From swellrt with Apache License 2.0 | 4 votes |
@UiHandler("content") void handleMouseDown(MouseDownEvent e) { // Prevent the editor from losing selection focus. e.preventDefault(); e.stopPropagation(); }
Example 8
Source File: HorizontalToolbarButtonWidget.java From swellrt with Apache License 2.0 | 4 votes |
@UiHandler("self") void handleMouseDown(MouseDownEvent e) { // Prevent the editor from losing selection focus. e.preventDefault(); e.stopPropagation(); }
Example 9
Source File: EventDispatcherPanel.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public void onMouseDown(MouseDownEvent event) { if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) { event.stopPropagation(); } }
Example 10
Source File: VerticalToolbarButtonWidget.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@UiHandler("content") void handleMouseDown(MouseDownEvent e) { // Prevent the editor from losing selection focus. e.preventDefault(); e.stopPropagation(); }
Example 11
Source File: HorizontalToolbarButtonWidget.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@UiHandler("self") void handleMouseDown(MouseDownEvent e) { // Prevent the editor from losing selection focus. e.preventDefault(); e.stopPropagation(); }