本文整理汇总了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;
}
}
示例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
{
}
}
示例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();
}
}
示例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();
}
示例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);
}
}
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例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();
}
示例11: onMouseUp
import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
mapWidget.setController(new ZoomToRectangleOnceController(map));
event.stopPropagation();
}
示例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();
}
示例13: onMouseUp
import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
mapWidget.setController(new ActualZoomToRectangleController(mapWidget));
event.stopPropagation();
}
示例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();
}
示例15: onMouseUp
import com.google.gwt.event.dom.client.MouseUpEvent; //导入方法依赖的package包/类
public void onMouseUp(MouseUpEvent event) {
event.stopPropagation();
}