Java 类com.google.gwt.event.dom.client.DoubleClickEvent 实例源码

项目:Wiab.pro    文件:BlipMenuController.java   
@Override
public boolean onDoubleClick(DoubleClickEvent event, Element context) {
  // Ignore empty or disabled blip.
  if (DomUtil.findFirstChildElement(context, Type.META) == null || !isEnabled()) {
    return false;
  }

  // Ignore deleted blip.
  if (DomUtil.isQuasiDeleted(context)) {
    return true;
  }

  menuContextElement = context;
  menuContextEvent = event.getNativeEvent();
  hideAndScheduleShowPopupMenu();
  event.stopPropagation();
  event.preventDefault();
  return true;
}
项目:gantt    文件:GanttWidget.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
    GWT.log("onDoubleClick(DoubleClickEvent)");
    if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
        doubleClickDetectionMaxTimer.cancel();
        if (!insideDoubleClickDetectionInterval && numberOfMouseClicksDetected < 2) {
            return; // ignore double-click
        }
        if (targetBarElement != null) {
            disableClickOnNextMouseUp();
            targetBarElement = null;
        }
        Element bar = getBar(event.getNativeEvent());
        if (bar != null && numberOfMouseClicksDetected > 1) {
            fireClickRpc(bar, event.getNativeEvent());
        }
        cancelDoubleClickDetection();
    }
}
项目:walkaround    文件:LogPanel.java   
/**
 * Gets the filter for a stream, creating one if one does not already exist.
 */
private FilterButton getStreamFilter(final String stream) {
  FilterButton filter = streamFilters.get(stream);
  if (filter == null) {
    // Just in case a user can cause a stream to be called "'><script
    // src='evil.js'></script><pre '", we only use safe values for CSS
    // classes. There's no need for the class names to be human readable.
    int streamId = streamFilters.countEntries();
    String itemClass = "w-s-" + streamId;
    String containerClass = STREAM_FILTER_PREFIX + streamId;
    filter = new FilterButton(new DoubleClickHandler() {
      @Override
      public void onDoubleClick(DoubleClickEvent event) {
        enableOnlyOneStream(stream);
      }
    }, entries, containerClass, itemClass, stream, css.stream());
    self.add(filter, streamsContainer);
    streamFilters.put(stream, filter);
    // TODO(ohler): Make styles work in IE.
    if (!UserAgent.isIE()) {
      // Replace stylesheet to make the new filter work.
      style.setInnerText(style.getInnerText() + filter.getCssRule());
    }
  }
  return filter;
}
项目:gwt-chronoscope    文件:ChartDblClickHandler.java   
public void onDoubleClick(DoubleClickEvent event) {
  ChartState chartInfo = getChartState(event);
  Chart chart = chartInfo.chart;

  chart.setAnimating(false);

  boolean handled = false;
  if (chart.maxZoomTo(getLocalX(event), getLocalY(event))) {
    event.stopPropagation();
    event.preventDefault();
    handled = true;
  }

  chartInfo.setHandled(handled);
}
项目:che    文件:TabWidget.java   
@Inject
public TabWidget(
    PartStackUIResources resources,
    @Assisted String title,
    @Assisted SVGResource icon,
    @Assisted boolean closable) {
  this.resources = resources;
  this.title = title;
  this.icon = MoreObjects.firstNonNull(icon, emptySVGResource());

  initWidget(UI_BINDER.createAndBindUi(this));

  titleLabel.setText(title);

  iconPanel.add(new SVGImage(getIcon()));

  addDomHandler(this, ClickEvent.getType());
  addDomHandler(this, DoubleClickEvent.getType());

  if (closable) {
    closeButton.addDomHandler(
        event -> delegate.onTabClosing(TabWidget.this), ClickEvent.getType());
  } else {
    closeButton.setVisible(false);
  }
}
项目:gerrit    文件:RelatedChangesTab.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
  Element row = getRow(event.getNativeEvent().getEventTarget().<Element>cast());
  if (row != null) {
    movePointerTo(startRow + DOM.getChildIndex(body, row), false);
    onOpenRow(row);
    event.stopPropagation();
  }
}
项目:gwt-mousemanager    文件:MouseHandlerManager.java   
/**
 * Update event caches to keep track of the latest event of each instance.
 * @param the event to cache
 */
private void updateEventCaches(Event<?> event){
    if(event == null){
        return;
    }
    if(event instanceof DoubleClickEvent){
        doubleClickEvent = new org.gz.gwt.mousemanager.client.event.DoubleClickEvent((DoubleClickEvent)event, target);
    }
    if(event instanceof ClickEvent){
        clickEvent = new org.gz.gwt.mousemanager.client.event.ClickEvent((ClickEvent)event, target);
    }       
    if(event instanceof MouseUpEvent){
        mouseUpEvent = new org.gz.gwt.mousemanager.client.event.MouseUpEvent((MouseUpEvent)event, target);
    }
    if(event instanceof MouseDownEvent){
        mouseDownEvent = new org.gz.gwt.mousemanager.client.event.MouseDownEvent((MouseDownEvent)event, target);
    } 
    if(event instanceof MouseMoveEvent){
        mouseMoveEvent = new org.gz.gwt.mousemanager.client.event.MouseMoveEvent((MouseMoveEvent)event, target);
    }
    if(event instanceof MouseOverEvent){
        mouseOverEvent = new org.gz.gwt.mousemanager.client.event.MouseOverEvent((MouseOverEvent)event, target);
    }
    if(event instanceof MouseOutEvent){
        mouseOutEvent = new org.gz.gwt.mousemanager.client.event.MouseOutEvent((MouseOutEvent)event, target);
    }
    if(event instanceof MouseWheelEvent){
        mouseWheelEvent = new org.gz.gwt.mousemanager.client.event.MouseWheelEvent((MouseWheelEvent)event, target);
    }
    if(event instanceof ContextMenuEvent){
        contextMenuEvent = new org.gz.gwt.mousemanager.client.event.ContextMenuEvent();
    }
}
项目:walkaround    文件:LogPanel.java   
private LogPanel(Logs log) {
  this.log = log;
  initWidget(BINDER.createAndBindUi(this));

  // Add filter buttons. Global filter, then log-level filters.
  StringBuilder rules = new StringBuilder();
  rules.append(css.getText());

  for (final Level level : Level.values()) {
    String itemClass = LEVEL_CLASSES.get(level);
    String containerClass = LEVEL_FILTER_PREFIX + itemClass;
    FilterButton levelFilter = new FilterButton(new DoubleClickHandler() {
      @Override
      public void onDoubleClick(DoubleClickEvent event) {
        enableOnlyMoreImportantLevels(level);
      }
    }, entries, containerClass, itemClass, level.name(), css.level());
    levelFilters.put(level, levelFilter);
    self.add(levelFilter, levelsContainer);
    rules.append(levelFilter.getCssRule());
  }

  // TODO(ohler): Make styles work in IE; the log panel consumes the entire
  // screen without them.  In IE8, I've seen this crash in setInnerText().
  if (!UserAgent.isIE()) {
    // Inject style.
    style.setInnerText(rules.toString());
    Document.get().getBody().appendChild(style);
  }

  setActive(true);
}
项目:Wiab.pro    文件:EventDispatcherPanel.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
  if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) {
    event.stopPropagation();
  }
}
项目:listmaker    文件:ItemsTable.java   
protected HandlerRegistration addDoubleClickHandler(DoubleClickHandler doubleClickhandler)
{
    return addDomHandler(doubleClickhandler, DoubleClickEvent.getType());
}
项目:che    文件:ToolButton.java   
/** Blocks double clicking on the button and on the parent element. */
private void blockDoubleClicking() {
  addDomHandler(
      new DoubleClickHandler() {
        @Override
        public void onDoubleClick(DoubleClickEvent event) {
          event.stopPropagation();
          event.preventDefault();
        }
      },
      DoubleClickEvent.getType());
}
项目:che    文件:EditorTabWidget.java   
@Inject
public EditorTabWidget(
    @Assisted final EditorPartPresenter relatedEditorPart,
    @Assisted EditorPartStack relatedEditorPartStack,
    PartStackUIResources resources,
    EditorTabContextMenuFactory editorTabContextMenu,
    final EventBus eventBus,
    final EditorAgent editorAgent) {
  this.resources = resources;
  this.relatedEditorPart = relatedEditorPart;
  this.relatedEditorPartStack = relatedEditorPartStack;
  this.editorAgent = editorAgent;

  initWidget(UI_BINDER.createAndBindUi(this));

  this.editorTabContextMenu = editorTabContextMenu;
  this.file = relatedEditorPart.getEditorInput().getFile();
  this.icon = relatedEditorPart.getTitleImage();
  this.title.setText(file.getDisplayName());
  // add "path" attribute describing the full path of opened file, will be used full for testing
  this.title.getElement().setAttribute("path", file.getLocation().toString());
  this.id = title + UUID.uuid(4);

  iconPanel.add(getIcon());

  addDomHandler(this, ClickEvent.getType());
  addDomHandler(this, DoubleClickEvent.getType());
  addDomHandler(this, ContextMenuEvent.getType());

  eventBus.addHandler(ResourceChangedEvent.getType(), this);
  eventBus.addHandler(FileEvent.TYPE, this);

  sinkEvents(Event.ONMOUSEDOWN);

  closeButton.addDomHandler(
      event -> editorAgent.closeEditor(relatedEditorPart), ClickEvent.getType());

  relatedEditorPart.addPropertyListener(
      (source, propId) -> {
        if (propId == EditorPartPresenter.PROP_INPUT) {
          file = relatedEditorPart.getEditorInput().getFile();
          title.setText(file.getDisplayName());
        }
      });
}
项目:che    文件:PartButtonWidget.java   
@Inject
public PartButtonWidget(@Assisted String title) {
  initWidget(UI_BINDER.createAndBindUi(this));
  ensureDebugId("partButton-" + title);

  addDomHandler(this, DoubleClickEvent.getType());
  addDomHandler(this, ClickEvent.getType());
}
项目:firefly    文件:HistoryTagsCmd.java   
private void addDoubleClick(final TablePanel table, final boolean isTags) {
    DoubleClickHandler dch = new DoubleClickHandler() {
        public void onDoubleClick(DoubleClickEvent event) {
            resubmitSearch(table, isTags);
        }
    };
    table.addDoubleClickListner(dch);
}
项目:gerrit    文件:ValueEditor.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
  if (enabled && event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
    edit();
  }
}
项目:appformer    文件:TreeHierarchyInternalItemView.java   
@EventHandler("preference-tree-internal-item-label")
public void contractExpand(final DoubleClickEvent event) {
    if (!children.getHidden()) {
        contract();
    } else {
        expand();
    }
}
项目:qafe-platform    文件:EventFactory.java   
public static DoubleClickHandler createDoubleClickListener(final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new DoubleClickHandler() {
        public void onDoubleClick(DoubleClickEvent event) {
            Map<String,String> mouseInfo = getMouseInfo(event);
            CallbackHandler.createCallBack(event.getSource(), QAMLConstants.EVENT_ONDBLCLICK, ev, input, mouseInfo);
        }
    };
}
项目:ineform    文件:ChooserFw.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
    if (valueRange.getSelectedIndex() != -1) {
        String value = valueRange.getValue(valueRange.getSelectedIndex());
        chooser.select(stringToObject.get(value), true, true);
    }
}
项目:ListBuilder    文件:VListBuilder.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
    if (event.getSource() == optionsListBox) {
        moveSelectedItemsLeftToRight();
        optionsListBox.setSelectedIndex(-1);
        optionsListBox.setFocus(false);
    } else if (event.getSource() == selectionsListBox) {
        moveSelectedItemsRightToLeft();
        selectionsListBox.setSelectedIndex(-1);
        selectionsListBox.setFocus(false);
    }

}
项目:ListBuilder    文件:VListBuilder.java   
public void onDoubleClick(DoubleClickEvent event) {
    if (event.getSource() == options) {
        addItem();
    } else if (event.getSource() == selections) {
        removeItem();
    }
}
项目:geomajas-project-client-gwt    文件:LineStringDrawController.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
    if (event.getNativeButton() != Event.BUTTON_RIGHT) {
        handler.onDraw(geometry);
    }
}
项目:geomajas-project-client-gwt    文件:CompositeGeometryIndexController.java   
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (DoubleClickHandler handler : doubleClickHandlers) {
            handler.onDoubleClick(event);
        }
    }
}
项目:geomajas-project-client-gwt    文件:EditGeometryBaseController.java   
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getEditingState() == GeometryEditState.IDLE) {
        idleController.onDoubleClick(event);
    } else if (service.getEditingState() == GeometryEditState.DRAGGING) {
        dragController.onDoubleClick(event);
    } else if (service.getEditingState() == GeometryEditState.INSERTING) {
        insertController.onDoubleClick(event);
    }
}
项目:geomajas-project-client-gwt    文件:PanController.java   
/**
 * Zoom in to the double-clicked position.
 */
public void onDoubleClick(DoubleClickEvent event) {
    //Check if there was a last click that was handled in this class.
    if (null != lastClickPosition) {
        // Zoom in on the event location.
        Bbox bounds = mapWidget.getMapModel().getMapView().getBounds();
        double x = lastClickPosition.getX() - (bounds.getWidth() / 4);
        double y = lastClickPosition.getY() - (bounds.getHeight() / 4);
        Bbox newBounds = new Bbox(x, y, bounds.getWidth() / 2, bounds.getHeight() / 2);
        mapWidget.getMapModel().getMapView().applyBounds(newBounds, ZoomOption.LEVEL_CHANGE);
    }
}
项目:geomajas-project-client-gwt    文件:MeasureDistanceController.java   
/** Stop the measuring, and remove all graphics from the map. */
public void onDoubleClick(DoubleClickEvent event) {
    tempLength = 0;
    mapWidget.unregisterWorldPaintable(distanceLine);
    mapWidget.unregisterWorldPaintable(lineSegment);
    distanceLine.setGeometry(null);
    lineSegment.setGeometry(null);
    if (panel != null) {
        panel.destroy();
    }
    dispatchState(State.STOP);
}
项目:geomajas-project-client-gwt    文件:ParentEditController.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
    if (controller != null) {
        controller.onDoubleClick(event);
        if (!controller.isBusy()) {
            panController.onDoubleClick(event);
        }
    } else {
        panController.onDoubleClick(event);
    }
}
项目:geomajas-project-client-gwt2    文件:CompositeGeometryIndexController.java   
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (DoubleClickHandler handler : doubleClickHandlers) {
            handler.onDoubleClick(event);
        }
    }
}
项目:geomajas-project-client-gwt2    文件:EditGeometryBaseController.java   
public void onDoubleClick(DoubleClickEvent event) {
    if (service.getEditingState() == GeometryEditState.IDLE) {
        idleController.onDoubleClick(event);
    } else if (service.getEditingState() == GeometryEditState.DRAGGING) {
        dragController.onDoubleClick(event);
    } else if (service.getEditingState() == GeometryEditState.INSERTING) {
        insertController.onDoubleClick(event);
    }
}
项目:geomajas-project-client-gwt2    文件:GeocoderWidgetViewImpl.java   
public void onDoubleClick(DoubleClickEvent event) {
    event.stopPropagation();
}
项目:geomajas-project-client-gwt2    文件:AbstractMapWidget.java   
public void onDoubleClick(DoubleClickEvent event) {
    event.stopPropagation();
}
项目:incubator-wave    文件:EventDispatcherPanel.java   
@Override
public void onDoubleClick(DoubleClickEvent event) {
  if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) {
    event.stopPropagation();
  }
}
项目:gwt-mousemanager    文件:MouseHandlerManager.java   
/**
 * Return Event object string identifier 
 * @param event
 * @return Type name of the event object
 */
private static String convertNativeEventToStringIdentifier(Event<?> event){
    if(event == null){
        return "";
    }
    if(event instanceof DoubleClickEvent){
        return DoubleClickEvent.getType().getName();
    }
    if(event instanceof ClickEvent){
        return ClickEvent.getType().getName();
    }       
    if(event instanceof MouseUpEvent){
        return MouseUpEvent.getType().getName();
    }
    if(event instanceof MouseDownEvent){
        return MouseDownEvent.getType().getName();
    } 
    if(event instanceof MouseMoveEvent){
        return MouseMoveEvent.getType().getName();
    }
    if(event instanceof MouseOverEvent){
        return MouseOverEvent.getType().getName();
    }
    if(event instanceof MouseOutEvent){
        return MouseOutEvent.getType().getName();
    }
    if(event instanceof MouseWheelEvent){
        return MouseWheelEvent.getType().getName();
    }
    if(event instanceof ContextMenuEvent){
        return ContextMenuEvent.getType().getName();
    }
    return "";
}
项目:appinventor-extensions    文件:HandlerPanel.java   
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
  return addDomHandler(handler, DoubleClickEvent.getType());
}
项目:Wiab.pro    文件:EventDispatcherPanel.java   
@Override
void registerGwtHandler() {
  addDomHandler(this, DoubleClickEvent.getType());
}
项目:Wiab.pro    文件:EventDispatcherPanel.java   
@Override
boolean dispatch(DoubleClickEvent event, Element context, WaveDoubleClickHandler handler) {
  return handler.onDoubleClick(event, context);
}
项目:Wiab.pro    文件:ImplPanel.java   
@Override
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
  return addDomHandler(handler, DoubleClickEvent.getType());
}
项目:errai-crud    文件:ContactDisplay.java   
/**
 * Called for double-click events on the {@link DataField @DataField} {@link #contact}. This event is observed by
 * {@link ContactListPage#editComponent(ContactDisplay)}.
 */
@EventHandler("contact")
public void onDoubleClick(final DoubleClickEvent event) {
  dblClick.fire(this);
}
项目:x-cure-chat    文件:DoubleClickFocusPanel.java   
@Override
public HandlerRegistration addDoubleClickHandler( DoubleClickHandler handler) {
    return addDomHandler(handler, DoubleClickEvent.getType() );
}
项目:ephesoft    文件:Table.java   
@Override
public final HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return addDomHandler(handler, DoubleClickEvent.getType());
}
项目:circuitjs1    文件:CirSim.java   
public void onDoubleClick(DoubleClickEvent e){
    e.preventDefault();
//      if (!didSwitch && mouseElm != null)
    if (mouseElm != null && !(mouseElm instanceof SwitchElm))
        doEdit(mouseElm);
   }