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

项目:putnami-web-toolkit    文件:TableOrder.java   
@Override
public void onMouseDown(MouseDownEvent event) {
    this.onMouseUp(null);

    Icon dragIcon = (Icon) event.getSource();
    this.selectedRow = (TableRow<T>) dragIcon.getParent().getParent();
    this.body = (TableEditorBody<T>) this.selectedRow.getParent();

    this.overRegistration = new HandlerRegistrationCollection();
    this.upRegistration = RootPanel.get().addDomHandler(this, MouseUpEvent.getType());
    this.rows = Lists.newArrayList(this.body.getRows());
    for (TableRow<T> row : this.rows) {
        this.overRegistration.add(row.addDomHandler(this, MouseOverEvent.getType()));
    }
    TableOrder.this.disableTextSelection(true);
    RootPanel.get().getElement().getStyle().setCursor(Style.Cursor.MOVE);
    StyleUtils.addStyle(this.selectedRow, TableOrder.STYLE_ROW_DRAGING);
}
项目:regex-tester    文件:ResultMouseOverHandler.java   
public void onMouseOver(final MouseOverEvent event)
{
   HighlightedResult widget = (HighlightedResult) event.getSource();
   HighlightedGroup group = widget.getHighlightedGroup();

   if (group.getGroup() != null)
   {
      widget.setMouseOverEvent(event);
      if (!hasHighlightedChildren(widget))
      {
         area.setSelectionRange(0, 0);
         int start = group.getGroup().getRegexFragment().getStart();
         int length = group.getGroup().getRegexFragment().getCaptured().length + 2;

         if (start + length > area.getText().length())
            length = area.getText().length() - start;

         area.setSelectionRange(start, length);
      }
   }
}
项目:x-cure-chat    文件:UserAvatarImageWidget.java   
@Override
public void onMouseOver(MouseOverEvent event) {
    if( SiteManager.isUserLoggedIn() ) {
        //If the user is logged in, then
        if( SiteManager.getUserID() == userID ) {
            //If this is the avatar of the user who is logged in
            if( AvatarSpoilersHelper.isAvatarSpoilerActive( spoilerID, spoilerExpDate ) ) {
                //If this user is pranked  he can clean his prank
                activateControls( false , true );
            } else {
                //If this user is NOT pranked then there is nothing to be done
                activateControls( false , false );
            }
        } else {
            //If this is an avatar of some other user
            if( AvatarSpoilersHelper.isAvatarSpoilerActive( spoilerID, spoilerExpDate ) ) {
                //If the other user is pranked then one can clean his prank or set a new one
                activateControls( true , true );
            } else {
                //If the other user is NOT pranked then one can prank him
                activateControls( true , false );
            }
        }
    }
}
项目:che    文件:ConsoleButtonImpl.java   
@Inject
public ConsoleButtonImpl(
    ButtonResources resources,
    TooltipWidget tooltip,
    @NotNull @Assisted String prompt,
    @NotNull @Assisted SVGResource image) {
  this.resources = resources;
  this.tooltip = tooltip;
  this.tooltip.setDescription(prompt);

  resources.buttonCss().ensureInjected();

  initWidget(UI_BINDER.createAndBindUi(this));

  icon = new SVGImage(image);
  icon.getElement().setAttribute("class", resources.buttonCss().mainButtonIcon());

  setCheckedStatus(false);

  addDomHandler(this, ClickEvent.getType());
  addDomHandler(this, MouseOutEvent.getType());
  addDomHandler(this, MouseOverEvent.getType());
}
项目:OpenTripPlanner-client-gwt    文件:ItineraryDetailsWidget.java   
private Widget getEndPointDetails(final String css, Date time,
        String address, final Wgs84LatLonBean position) {
    HTML line = new HTML();
    line.addStyleName("itinerary-details-line");
    line.addStyleName("itinerary-details-" + css);
    line.addStyleName(css + "-icon");
    String html = "<span class='time'>" + FormatUtils.formatTime(time)
            + "</span> - " + FormatUtils.formatAddress(address);
    line.setHTML(html);
    final String infoHtml = "<div class='info-panel-" + css + " " + css
            + "-icon'>" + html + "</div>";
    line.addMouseOverHandler(new MouseOverHandler() {

        @Override
        public void onMouseOver(MouseOverEvent event) {
            if (selected)
                listener.onItineraryStepClicked(infoHtml, position);
        }
    });
    return line;
}
项目:firefly    文件:BasicImageGrid.java   
public void onMouseOver(MouseOverEvent event) {
    Widget widget = (Widget) event.getSource();
    if (doHilite) {
        GwtUtil.setStyle(widget, "backgroundColor", hiliteBackground);
        GwtUtil.setStyle(widget, "border", "1px solid " + hiliteBorder);
    }
    BasicImageGrid.this.setMouseOverAt(widget);
    mouseOverTimer.schedule(1500);
}
项目:firefly    文件:ImageGridPanel.java   
public void onMouseOver(MouseOverEvent event) {
    Widget widget = (Widget)event.getSource();
    DOM.setStyleAttribute(widget.getElement(), "backgroundColor", "#bde");
    DOM.setStyleAttribute(widget.getElement(), "border", "1px solid #abc");
    ImageGridPanel.this.setMouseOverAt(widget);
    mouseOverTimer.schedule(1500);
}
项目:appformer    文件:SideDockItem.java   
void createButton() {
    itemButton.setSize(ButtonSize.SMALL);
    itemButton.setType(ButtonType.LINK);
    configureIcon(itemButton,
                  getDock().getImageIcon());
    mouseEventHandler = new MouseEventHandler();
    itemButton.addDomHandler(mouseEventHandler,
                             MouseOverEvent.getType());
    itemButton.addStyleName(CSS.CSS().sideDockItem());
    itemButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (!isOpened()) {
                openAndExecuteExpandCommand();
            } else {
                closeAndExecuteCommand();
            }
        }
    });
}
项目:platypus-js    文件:EventsExecutor.java   
public void setMouseEntered(JavaScriptObject aValue) {
    if (mouseEntered != aValue) {
        if (mouseOverReg != null) {
            mouseOverReg.removeHandler();
            mouseOverReg = null;
        }
        mouseEntered = aValue;
        if (mouseEntered != null) {
            MouseOverHandler handler = new MouseOverHandler() {
                @Override
                public void onMouseOver(MouseOverEvent event) {
                    if (mouseEntered != null) {
                        event.stopPropagation();
                        executeEvent(mouseEntered, EventsPublisher.publish(event));
                    }
                }
            };
            if (component instanceof Widget) {
                mouseOverReg = ((Widget) component).addDomHandler(handler, MouseOverEvent.getType());
            } else if (component instanceof HasMouseOverHandlers) {
                mouseOverReg = ((HasMouseOverHandlers) component).addMouseOverHandler(handler);
            }
        }
    }
}
项目:bitcoin-transaction-explorer    文件:ContextFieldSet.java   
@SuppressWarnings("unchecked")
@Override
public void onMouseOver(final MouseOverEvent event) {
  popupHideTimer.cancel();

  if (popupShowTimer != null) {
    popupShowTimer.cancel();
  }

  popupShowTimer = new TypedTimer((ContextField<T>) event.getSource());
  popupShowTimer.schedule(popupPanel.isShowing() ? 0 : POPUP_SHOW_DELAY);
}
项目:bitcoin-transaction-explorer    文件:ContextFieldSet.java   
@SuppressWarnings("unchecked")
@Override
public void onClick(final ClickEvent event) {
  if (selectedField != null) {
    selectedField.setSelected(false);
  }

  if (selectedField == event.getSource()) {
    selectedField = null;
    return;
  }

  selectedField = (ContextField<T>) event.getSource();
  selectedField.setSelected(true);

  selectedField.fireEvent(new MouseOverEvent() {});
}
项目:putnami-web-toolkit    文件:AbstractHover.java   
private void bindHandlers() {
    if (this.widget == null) {
        return;
    }

    this.registrations.removeHandler();
    switch (this.getTrigger()) {
        case FOCUS:
            this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, FocusEvent.getType()));
            this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, BlurEvent.getType()));
            break;
        case HOVER:
            this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, MouseOverEvent.getType()));
            this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, MouseOutEvent.getType()));
            break;
        case MANUAL:
            break;
        default:
            break;
    }
}
项目:putnami-web-toolkit    文件:TableOrder.java   
@Override
public void onMouseOver(MouseOverEvent event) {
    if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
        this.hoverRow = (TableRow<T>) event.getSource();
        this.body.switchRows(this.hoverRow, this.selectedRow);
    }
    event.preventDefault();
}
项目:putnami-web-toolkit    文件:Carousel.java   
public void setAutoPlay(boolean autoPlay) {
    this.autoPlay = autoPlay;
    this.handlerRegistrations.removeHandler();
    if (autoPlay) {
        this.autoPlayTimer.scheduleRepeating(this.timerDelay);
        this.handlerRegistrations.add(this.addDomHandler(this, MouseOverEvent.getType()));
        this.handlerRegistrations.add(this.addDomHandler(this, MouseOutEvent.getType()));
    } else {
        this.autoPlayTimer.cancel();
    }
}
项目:atom    文件:PopupObjectButton.java   
@UiHandler("popupObjectButton")
void doMouseOver(MouseOverEvent event) {
    if(active) {
        borderImage.setResource(AtomClientBundle.INSTANCE.menuPopupOver());
        popupObjectButton.setStyleName(popupObjectButtonStyle.over());
        panel.setStyleName(popupObjectButtonStyle.activeSpace());
    }
}
项目:incubator-wave    文件:GadgetWidgetUi.java   
@Override
public void addHandlers(MouseOverHandler mouseOverHandler, MouseOutHandler mouseOutHandler) {
  // TODO(user): Investigate why the event propagation does not work and
  // remove unnecessary handler setup.
  addDomHandler(mouseOverHandler, MouseOverEvent.getType());
  addDomHandler(mouseOutHandler, MouseOutEvent.getType());
  enclosingBox.addMouseOverHandler(mouseOverHandler);
  gadgetFrame.addMouseOverHandler(mouseOverHandler);
  iframeDiv.addMouseOverHandler(mouseOverHandler);
  gadgetIframe.addHandler(mouseOverHandler, MouseOverEvent.getType());
  metaButtons.addMouseOverHandler(mouseOverHandler);
  metaLeft.addMouseOverHandler(mouseOverHandler);
  metaButtonsPanel.addMouseOverHandler(mouseOverHandler);
  metaRight.addMouseOverHandler(mouseOverHandler);
  menu.getButton().addMouseOverHandler(mouseOverHandler);
}
项目: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();
    }
}
项目:regex-tester    文件:ResultMouseOverHandler.java   
public void onMouseOut(final MouseOutEvent event)
{
   HighlightedResult widget = (HighlightedResult) event.getSource();
   HighlightedGroup group = widget.getHighlightedGroup();

   widget.setMouseOverEvent(null);
   if (group.getGroup() != null)
   {
      area.setSelectionRange(0, 0);

      Widget parent = widget.getParent();
      while (parent instanceof HighlightedResult)
      {
         MouseOverEvent mouseOverEvent = ((HighlightedResult) parent).getMouseOverEvent();
         if (mouseOverEvent != null)
         {
            final Widget finalParent = parent;
            onMouseOver(new MouseOverEvent() {
               @Override
               public Object getSource()
               {
                  return finalParent;
               }
            });
            break;
         }
         else
            parent = parent.getParent();
      }
   }
}
项目:sig-seguimiento-vehiculos    文件:AnchorBuilder.java   
private MouseOverHandler getMouseOverhandler(final Anchor anchor) {
    return new MouseOverHandler() {
        @Override
        public void onMouseOver(MouseOverEvent event) {
            anchor.addStyleName(ThemeStyles.get().style().borderBottom());
        }
    };
}
项目:GwtErraiMaterialMvcExample    文件:LoginPanel.java   
private void onSocialButtonMouseOverHandler(MouseOverEvent event ) {
    MaterialImage source = (MaterialImage)event.getSource();
    source.setBackgroundColor(Color.ORANGE);
}
项目:gwt-chronoscope    文件:ChartMouseOverHandler.java   
public void onMouseOver(MouseOverEvent event) {
  ChartState chartInfo = getChartState(event);
  Chart chart = chartInfo.chart;
  int x = getLocalX(event);
  int y = getLocalY(event);
  chart.setPlotFocus(x, y);
  boolean isMouseInPlot = false;
  if ((null != chart) && (null != chart.getPlot()) && (null != chart.getPlot().getBounds())) {
    isMouseInPlot = chart.getPlot().getBounds().inside(x, y);
  }
  chart.setCursor(
      isMouseInPlot ? Cursor.DRAGGABLE : Cursor.DEFAULT);
  //((DOMView) chart.getView()).focus();
  chartInfo.setHandled(true);
}
项目:aggregate    文件:AggregateBaseHandlers.java   
public void onMouseOver(MouseOverEvent event) {
  if(!AggregateUI.getUI().displayingHelpBalloons()) {
    return;
  }

  if(helpBalloon != null) {
    // hide the tool tip
    widget.setTitle(BasicConsts.EMPTY_STRING);

    // show the help balloon;
    helpBalloon.display();
  }
}
项目:che    文件:ItemsList.java   
private void attachEventHandlers() {
  addDomHandler(
      event -> {
        if (overItem != null) {
          overItem.removeStyleName(resources.css().popupItemOver());
        }
        overItem = ItemWidget.this;
        addStyleName(resources.css().popupItemOver());
        if (childList != null) {
          childList.hide();
        }

        if (dataProvider.isGroup(item)) {
          Pair<List<MenuItem>, String> children = dataProvider.getChildren(item);
          createChildPopup(children);
        }
      },
      MouseOverEvent.getType());

  addDomHandler(
      event -> {
        if (dataProvider.isGroup(item)) {
          return;
        }

        hide(true);

        getActionHandler().ifPresent(actionHandler -> actionHandler.onAction(item));
      },
      ClickEvent.getType());
}
项目:che    文件:ConsoleButtonImpl.java   
/** {@inheritDoc} */
@Override
public void onMouseOver(MouseOverEvent mouseOverEvent) {
  tooltip.setPopupPosition(getAbsoluteLeft(), getAbsoluteTop() + TOP_TOOLTIP_SHIFT);

  tooltip.show();
}
项目:che    文件:ActionButton.java   
private void addDomHandlers() {
  panel.addDomHandler(this, MouseOverEvent.getType());
  panel.addDomHandler(this, MouseOutEvent.getType());
  panel.addDomHandler(this, MouseDownEvent.getType());
  panel.addDomHandler(this, MouseUpEvent.getType());
  panel.addDomHandler(this, ClickEvent.getType());
}
项目:che    文件:ConsoleButtonImplTest.java   
@Test
public void tooltipShouldBeShown() throws Exception {
  widget.onMouseOver(mock(MouseOverEvent.class));

  verify(tooltip).setPopupPosition(0, TOP_TOOLTIP_SHIFT);
  verify(tooltip).show();
}
项目:geowe-core    文件:AnchorBuilder.java   
private MouseOverHandler getMouseOverhandler(final Anchor anchor) {
    return new MouseOverHandler() {
        @Override
        public void onMouseOver(MouseOverEvent event) {
            anchor.addStyleName(ThemeStyles.get().style().borderBottom());
        }
    };
}
项目:firefly    文件:FloatingVisBar.java   
public void updateAlignWidget(Widget w) {
    if (hreg != null) {
        hreg.removeHandler();
        hreg = null;
    }
    _popup.alignTo(w, PopupPane.Align.TOP_RIGHT, -15, 0);
    hreg = w.addDomHandler(new MouseOverHandler() {
        public void onMouseOver(MouseOverEvent event) {
            if (_dropClosed) _popup.show();
        }
    }, MouseOverEvent.getType());
}
项目:firefly    文件:FloatingStatusBar.java   
public void updateAlignWidget(Widget w) {
    if (hreg!=null) {
        hreg.removeHandler();
        hreg= null;
    }
    popup.alignTo(w, PopupPane.Align.BOTTOM_LEFT, 0, 0);
    hreg= w.addDomHandler(new MouseOverHandler() {
        public void onMouseOver(MouseOverEvent event) {
            if (dropClosed) popup.show();
        }
    },MouseOverEvent.getType() );
}
项目:appformer    文件:MultiplePermissionNodeEditorView.java   
@EventHandler("headerPanel")
private void onHeaderMouseOver(MouseOverEvent event) {
    if (!expanded) {
        headerPanel.setClassName("acl-header-panel-over");
        mouseOver = true;
    }
}
项目:qafe-platform    文件:EventFactory.java   
public static MouseOverHandler createOnMouseEnterListener(final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new MouseOverHandler() {
        public void onMouseOver(MouseOverEvent event) {
            Map<String,String> mouseInfo = getMouseInfo(event);
            CallbackHandler.createCallBack(event.getSource(), QAMLConstants.EVENT_ONMOUSE_ENTER, ev, input, mouseInfo);
        }
    };
}
项目:test-analytics-ng    文件:CapabilitiesGridWidget.java   
/**
 * Creates a mouse over handler for a specific row and column.
 *
 * @param row the row number.
 * @param column the column number.
 * @return the mouse over handler.
 */
private MouseOverHandler createMouseOverHandler(final int row, final int column) {
  return new MouseOverHandler() {
    @Override
    public void onMouseOver(MouseOverEvent event) {
      mouseOver(row, column);
    }
  };
}
项目:QMAClone    文件:PopupCanvas.java   
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
    eventHandlers.put(handler, (DomEvent.Type) MouseOverEvent.getType());
    if (canvas != null) {
        canvas.addDomHandler(handler, MouseOverEvent.getType());
    }
    return null;
}
项目:QMAClone    文件:ClickableLabel.java   
@Override
public void onMouseOver(MouseOverEvent event) {
    if (enabled) {
        addStyleDependentName(CLICKABLE_ENTER);

    }
}
项目:geomajas-project-client-gwt    文件:CompositeGeometryIndexController.java   
public void onMouseOver(MouseOverEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (MouseOverHandler handler : overHandlers) {
            handler.onMouseOver(event);
        }
    }
}
项目:geomajas-project-client-gwt2    文件:SimpleWfsRenderer.java   
@Override
public void onMouseOver(MouseOverEvent event) {
    if (shape instanceof Shape) {
        ((Shape) shape).setFillColor("yellow");
        ((Shape) shape).setStrokeColor("yellow");
        ((Shape) shape).setStrokeWidth(3);
    }
}
项目:geomajas-project-client-gwt2    文件:CompositeGeometryIndexController.java   
public void onMouseOver(MouseOverEvent event) {
    if (service.getIndexStateService().isEnabled(index)) {
        for (MouseOverHandler handler : overHandlers) {
            handler.onMouseOver(event);
        }
    }
}
项目:geomajas-project-client-gwt2    文件:EditGeometryBaseController.java   
public void onMouseOver(MouseOverEvent event) {
    if (service.getEditingState() == GeometryEditState.IDLE) {
        idleController.onMouseOver(event);
    } else if (service.getEditingState() == GeometryEditState.DRAGGING) {
        dragController.onMouseOver(event);
    } else if (service.getEditingState() == GeometryEditState.INSERTING) {
        insertController.onMouseOver(event);
    }
}
项目:geomajas-project-client-gwt2    文件:GeometryIndexStopInsertingHandler.java   
public void onMouseOver(MouseOverEvent event) {
    if (service.getEditingState() == GeometryEditState.INSERTING && isCorrectVertex()) {

        // Now snap the vertex to this location:
        if (service.getIndexService().getType(index) == GeometryIndexType.TYPE_VERTEX) {
            try {
                service.getIndexStateService().highlightBegin(Collections.singletonList(index));
                Coordinate location = getSnapLocation();
                service.setTentativeMoveLocation(location);
            } catch (GeometryIndexNotFoundException e) {
                throw new IllegalStateException(e);
            }
        }
    }
}
项目: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 "";
}