com.google.gwt.event.dom.client.MouseOverEvent Java Examples
The following examples show how to use
com.google.gwt.event.dom.client.MouseOverEvent.
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: GadgetWidgetUi.java From incubator-retired-wave with Apache License 2.0 | 6 votes |
@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); }
Example #2
Source File: TableOrder.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 6 votes |
@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); }
Example #3
Source File: AbstractHover.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 6 votes |
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; } }
Example #4
Source File: ContextFieldSet.java From bitcoin-transaction-explorer with MIT License | 6 votes |
@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() {}); }
Example #5
Source File: GadgetWidgetUi.java From swellrt with Apache License 2.0 | 6 votes |
@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); }
Example #6
Source File: AnchorBuilder.java From geowe-core with GNU General Public License v3.0 | 5 votes |
private MouseOverHandler getMouseOverhandler(final Anchor anchor) { return new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { anchor.addStyleName(ThemeStyles.get().style().borderBottom()); } }; }
Example #7
Source File: GwtToolWindowStripeButton.java From consulo with Apache License 2.0 | 5 votes |
public void doLayout() { HorizontalPanel widget = new HorizontalPanel(); widget.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); widget.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); widget.setHeight("100%"); setWidget(widget); sinkEvents(Event.ONCLICK | Event.ONFOCUS); addDomHandler(event -> { myFocus = true; updateBackgroundColor(); }, MouseOverEvent.getType()); addDomHandler(event -> { myFocus = false; updateBackgroundColor(); }, MouseOutEvent.getType()); addDomHandler(event -> { if (myClickListener != null) { myClickListener.run(); } }, ClickEvent.getType()); if (isVertical()) { setVerticalText(); } }
Example #8
Source File: Carousel.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
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(); } }
Example #9
Source File: TableOrder.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
@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(); }
Example #10
Source File: ContextFieldSet.java From bitcoin-transaction-explorer with MIT License | 5 votes |
@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); }
Example #11
Source File: SuggestionsTable.java From unitime with Apache License 2.0 | 5 votes |
@Override public void onMouseOver(MouseOverEvent e) { TimeHint.showHint(other.getElement(), otherTimeHint); } }); other.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent e) { TimeHint.hideHint(); } }); time.add(other); }
Example #12
Source File: AssignmentTable.java From unitime with Apache License 2.0 | 5 votes |
@Override public void onMouseOver(MouseOverEvent e) { TimeHint.showHint(current.getElement(), timeHint); } }); current.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent e) { TimeHint.hideHint(); } }); time.add(current); if (details.getAssignedTime() == null) { P arrow = new P("arrow"); arrow.setHTML(MESSAGES.assignmentArrow()); time.add(arrow); P notAssigned = new P("not-assigned"); notAssigned.setText(MESSAGES.unassignment()); time.add(notAssigned); } else if (details.getAssignedTime().getStartSlot() != details.getTime().getStartSlot() || details.getAssignedTime().getDays() != details.getTime().getDays() || !details.getAssignedTime().getPatternId().equals(details.getTime().getPatternId())) { P arrow = new P("arrow"); arrow.setHTML(MESSAGES.assignmentArrow()); time.add(arrow); final P other = new P("new"); other.setText(details.getAssignedTime().getName(iProperties.getFirstDay(), false, CONSTANTS)); if (details.getAssignedTime().getPref() != 0) other.getElement().getStyle().setColor(iProperties.getPreference(details.getAssignedTime().getPref()).getColor()); if (details.getAssignedTime().isStriked()) other.getElement().getStyle().setTextDecoration(TextDecoration.LINE_THROUGH); final String otherTimeHint = details.getClazz().getClassId() + "," + details.getAssignedTime().getDays() + "," + details.getAssignedTime().getStartSlot(); other.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent e) { TimeHint.showHint(other.getElement(), otherTimeHint); } }); other.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent e) { TimeHint.hideHint(); } }); time.add(other); } }
Example #13
Source File: NavItemDefaultEditorView.java From dashbuilder with Apache License 2.0 | 4 votes |
@EventHandler("itemNameInput") public void onItemNameInputOver(MouseOverEvent event) { itemNameInput.focus(); }
Example #14
Source File: HandlerPanel.java From appinventor-extensions with Apache License 2.0 | 4 votes |
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return addDomHandler(handler, MouseOverEvent.getType()); }
Example #15
Source File: GwtTabbedLayoutImpl.java From consulo with Apache License 2.0 | 4 votes |
public void setTabs(int index, Map<TabbedLayoutState.TabState, Widget> map) { clear(); for (Map.Entry<TabbedLayoutState.TabState, Widget> entry : map.entrySet()) { TabbedLayoutState.TabState state = entry.getKey(); GwtHorizontalLayoutImpl tabWidget = GwtComboBoxImplConnector.buildItem(state); if (state.myCloseButton != null) { SimplePanel closeButton = new SimplePanel(); tabWidget.add(closeButton); tabWidget.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT); Widget closeIcon = ImageConverter.create(state.myCloseButton); closeButton.setWidget(closeIcon); Widget closeHoveredIcon = ImageConverter.create(state.myCloseHoverButton); closeButton.addDomHandler(event -> { closeButton.setWidget(closeHoveredIcon); }, MouseOverEvent.getType()); closeButton.addDomHandler(event -> { closeButton.setWidget(closeIcon); }, MouseOutEvent.getType()); closeButton.addDomHandler(event -> { if (myCloseHandler != null) { int idx = getWidgetIndex(entry.getValue()); if (idx != -1) { myCloseHandler.accept(idx); } } }, ClickEvent.getType()); } else { tabWidget.addStyleName("gwt-TabBarItem-no-close-button"); } add(entry.getValue(), tabWidget); } selectTab(index); }
Example #16
Source File: ClickableDivPanel.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return addDomHandler(handler, MouseOverEvent.getType()); }
Example #17
Source File: ToggleButtonWidget.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return addDomHandler(handler, MouseOverEvent.getType()); }
Example #18
Source File: IconButtonTemplate.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent event) { mouseListener.onMouseEnter(); }
Example #19
Source File: ButtonsView.java From gwt-material-demo with Apache License 2.0 | 4 votes |
@UiHandler("btnHover") void onHover(MouseOverEvent e) { MaterialToast.fireToast("Hover Triggered"); btnHover.setText("Hovered"); }
Example #20
Source File: Anchor.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return this.addDomHandler(handler, MouseOverEvent.getType()); }
Example #21
Source File: Carousel.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent event) { if (this.pauseOnHover && this.autoPlay) { this.autoPlayTimer.cancel(); } }
Example #22
Source File: SuggestionsTable.java From unitime with Apache License 2.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent e) { RoomHint.showHint(current.getElement(), r.getId(), null, null, true); }
Example #23
Source File: SuggestionsTable.java From unitime with Apache License 2.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent e) { RoomHint.showHint(other.getElement(), q.getId(), null, null, true); }
Example #24
Source File: ListItem.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return this.addDomHandler(handler, MouseOverEvent.getType()); }
Example #25
Source File: AbstractInput.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return this.addDomHandler(handler, MouseOverEvent.getType()); }
Example #26
Source File: SuggestionsTable.java From unitime with Apache License 2.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent e) { RoomHint.showHint(other.getElement(), q.getId(), null, null, true); }
Example #27
Source File: AbstractHover.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent event) { if (AbstractHover.this.visibilityChange == Visibility.HIDE) { AbstractHover.this.schedule(AbstractHover.this.getShowDelay(), Visibility.SHOW); } }
Example #28
Source File: AssignmentTable.java From unitime with Apache License 2.0 | 4 votes |
@Override public void onMouseOver(MouseOverEvent e) { RoomHint.showHint(other.getElement(), q.getId(), null, null, true); }
Example #29
Source File: NavRootNodeEditorView.java From dashbuilder with Apache License 2.0 | 4 votes |
@EventHandler("itemNameInput") public void onItemNameInputOver(MouseOverEvent event) { itemNameInput.focus(); }
Example #30
Source File: ContextField.java From bitcoin-transaction-explorer with MIT License | 4 votes |
@Override public HandlerRegistration addMouseOverHandler(final MouseOverHandler handler) { return addDomHandler(handler, MouseOverEvent.getType()); }