当前位置: 首页>>代码示例>>Java>>正文


Java MouseUpEvent.stopPropagation方法代码示例

本文整理汇总了Java中com.google.gwt.event.dom.client.MouseUpEvent.stopPropagation方法的典型用法代码示例。如果您正苦于以下问题:Java MouseUpEvent.stopPropagation方法的具体用法?Java MouseUpEvent.stopPropagation怎么用?Java MouseUpEvent.stopPropagation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.event.dom.client.MouseUpEvent的用法示例。


在下文中一共展示了MouseUpEvent.stopPropagation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
/**
 * Trigger action when mouse up event fired
 * 
 * @param event
 */
protected void onMouseUp(MouseUpEvent event) {
	// Test if Right Click
	if (event.getNativeButton() == NativeEvent.BUTTON_RIGHT) {
		logger.info( "Handle NativeEvent.BUTTON_RIGHT begin >");
		event.stopPropagation();
		event.preventDefault();
		logger.info("Handle NativeEvent.BUTTON_RIGHT end <");
		return;
	}

	if ( !lockDrawConnection && inDragBuildConnection ) {
		logger.info( "draw connection lock: " +  lockDrawConnection );
		NodeShape shape = (NodeShape) getShapeUnderMouse();
		if (shape != null && shape instanceof InNodeShape) {
			Connection c = connfactory.buildConnection(this, startShape, shape);
			if (c == null) {
				Window.alert("Connection can't be build");
			} else {
				c.draw();
				connDrawSet.add(c);
				((NodeShape) startShape).onConnectionEnd(c);
				shape.onConnectionEnd(c);
			}
		}else {
			((NodeShape) startShape).onConnectionCancel();
		}
		deleteConnection(buildConnection);
		inDragBuildConnection = false;
		buildConnection = null;
	}
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:37,代码来源:DiagramController.java

示例2: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp( MouseUpEvent event )
{
	DOM.releaseCapture( getElement() );
	RootPanel.get().remove( this );

	if( fDragging )
	{
		RootPanel.get().remove( ghost );

		event.preventDefault();
		event.stopPropagation();

		Element target = DOM.eventGetTarget( DOM.eventGetCurrentEvent() );
		ghost.signalFinish( target );
	}
	else
	{

	}
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:22,代码来源:DragDrop.java

示例3: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp(MouseUpEvent event) {
	if (startEvent != null) {
		event.stopPropagation();
		PressEndEvent endEvent = new PressEndEvent(event);
		eventBus.fireEvent(startEvent);
		eventBus.fireEvent(endEvent);
		reset();
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:11,代码来源:ListItem.java

示例4: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp(MouseUpEvent event) {
	event.stopPropagation();
	PressEndEvent endEvent = new PressEndEvent(event); 
	eventBus.fireEvent(endEvent);
	this.fireEvent(endEvent);
	reset();
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:9,代码来源:ListPanelComponent.java

示例5: setMouseReleased

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void setMouseReleased(JavaScriptObject aValue) {
	if (mouseReleased != aValue) {
		if (mouseUpReg != null) {
			mouseUpReg.removeHandler();
			mouseUpReg = null;
		}
		mouseReleased = aValue;
		if (mouseReleased != null) {
			MouseUpHandler handler = new MouseUpHandler() {
				@Override
				public void onMouseUp(MouseUpEvent event) {
					// if (mouseState == MOUSE.PRESSED)
					// Event.releaseCapture(event.getRelativeElement());
					if (mouseReleased != null) {
						event.stopPropagation();
						mouseState = MOUSE.NULL;
						executeEvent(mouseReleased, EventsPublisher.publish(event));
					}
				}
			};
			if (component instanceof Widget)
				mouseUpReg = ((Widget) component).addDomHandler(handler, MouseUpEvent.getType());
			else if (component instanceof HasMouseUpHandlers)
				mouseUpReg = ((HasMouseUpHandlers) component).addMouseUpHandler(handler);
		}
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:28,代码来源:EventsExecutor.java

示例6: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp( MouseUpEvent event )
{
	if( !fResizing )
		return;

	updateSize( event.getNativeEvent().getEventTarget(), event.getScreenX() - startX, event.getScreenY() - startY );

	DOM.releaseCapture( getElement() );

	fResizing = false;

	event.stopPropagation();
	event.preventDefault();
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:16,代码来源:ResizablePanelBad.java

示例7: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp(MouseUpEvent event) {
	if (this.upRegistration != null) {
		this.upRegistration.removeHandler();
	}
	if (this.overRegistration != null) {
		this.overRegistration.removeHandler();
	}
	if (this.selectedRow != null) {
		StyleUtils.removeStyle(this.selectedRow, TableOrder.STYLE_ROW_DRAGING);
	}
	this.upRegistration = null;
	this.overRegistration = null;

	if (event != null) {
		event.stopPropagation();
		if (!Iterables.elementsEqual(this.rows, this.body.getRows())) {
			EventBus.get().fireEventFromSource(new RowOrderChangeEvent(this.body), TableOrder.this);
			this.body.setRowOrderDirty(true);
		}
	}

	this.body = null;
	this.hoverRow = null;
	this.selectedRow = null;
	TableOrder.this.disableTextSelection(false);

	RootPanel.get().getElement().getStyle().clearCursor();
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:30,代码来源:TableOrder.java

示例8: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp(MouseUpEvent event) {

	if (NativeEvent.BUTTON_LEFT == event.getNativeButton()) {
		Bbox currView = mapWidget.getMapModel().getMapView().getBounds();
		double w = currView.getWidth() / 3;
		double h = currView.getHeight() / 3;

		mapWidget.getMapModel().getMapView().translate(direction.getX() * w, direction.getY() * h);
		event.stopPropagation();
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:13,代码来源:PanArrowController.java

示例9: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
@Override
public void onMouseUp(MouseUpEvent event) {
  if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) {
    event.stopPropagation();
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:EventDispatcherPanel.java

示例10: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
	mapWidget.getMapModel().getMapView().scale(delta, ZoomOption.LEVEL_CHANGE);
	event.stopPropagation();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:5,代码来源:ZoomAddon.java

示例11: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
	mapWidget.setController(new ZoomToRectangleOnceController(map));
	event.stopPropagation();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:5,代码来源:ZoomToRectangleAddon.java

示例12: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
	// execute the action
	action.onClick(new ClickEvent(null));
	event.stopPropagation();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:6,代码来源:SingleMapAddon.java

示例13: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
	mapWidget.setController(new ActualZoomToRectangleController(mapWidget));
	event.stopPropagation();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:5,代码来源:ZoomToRectangleOnceController.java

示例14: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
//		StyleElement se = (StyleElement) Document.get().getElementById("inlineStyle");
//		se.setInnerText(".msRibbon { background: green; }");

		final Geolocation geo = Geolocation.getIfSupported();
		if (geo != null) {
			geo.getCurrentPosition(new Callback<Position, PositionError>() {

				@Override
				public void onSuccess(final Position result) {
					Coordinates coord = result.getCoordinates();
					TransformGeometryRequest req = new TransformGeometryRequest();
					GeometryFactory gf = new GeometryFactory(4326, 1);
					Point point = gf.createPoint(new Coordinate(coord.getLongitude(), coord.getLatitude()));

					req.setGeometry(GeometryConverter.toDto(point));
					req.setSourceCrs("EPSG:4326");
					req.setTargetCrs(mapWidget.getMapModel().getCrs());

					GwtCommand command = new GwtCommand(TransformGeometryRequest.COMMAND);
					command.setCommandRequest(req);

					GwtCommandDispatcher.getInstance().execute(command, new CommandCallback<CommandResponse>() {

						@Override
						public void execute(CommandResponse response) {
							if (response.getErrors().isEmpty()) {
								org.geomajas.geometry.Geometry geom = ((TransformGeometryResponse) response)
										.getGeometry();
								double accuracy = result.getCoordinates().getAccuracy();

								Bbox box = new Bbox(geom.getCoordinates()[0].getX() - (accuracy / 2), geom
										.getCoordinates()[0].getY() - (accuracy / 2), accuracy, accuracy);
								mapWidget.getMapModel().getMapView().applyBounds(box, ZoomOption.LEVEL_FIT);
							}
						}
					});

				}

				@Override
				public void onFailure(PositionError reason) {
					// TODO Auto-generated method stub

				}
			});
		}
		event.stopPropagation();
	}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:50,代码来源:ZoomToLocationController.java

示例15: onMouseUp

import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
	event.stopPropagation();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:4,代码来源:GeocoderWidgetViewImpl.java


注:本文中的com.google.gwt.event.dom.client.MouseUpEvent.stopPropagation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。