com.google.gwt.event.dom.client.MouseOverHandler Java Examples

The following examples show how to use com.google.gwt.event.dom.client.MouseOverHandler. 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 swellrt with Apache License 2.0 6 votes vote down vote up
@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: GadgetWidgetUi.java    From incubator-retired-wave with Apache License 2.0 6 votes vote down vote up
@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 #3
Source File: AnchorBuilder.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private MouseOverHandler getMouseOverhandler(final Anchor anchor) {
	return new MouseOverHandler() {
		@Override
		public void onMouseOver(MouseOverEvent event) {
			anchor.addStyleName(ThemeStyles.get().style().borderBottom());
		}
	};
}
 
Example #4
Source File: DiagramController.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Add a widget on the diagram
 * 
 * @param w the widget to add
 * @param left left margin with the absolute panel
 * @param top top margin with the absolute panel
 * 
 * @return the shape
 */
public FunctionShape addWidget(final Widget w, int left, int top) {

	w.getElement().getStyle().setZIndex(3);
	final FunctionShape shape = new FunctionShape(this, w);

	shapes.add(shape);
	widgetShapeMap.put(w, shape);
	functionsMap.put(w, new HashMap<Widget, Connection>());

	if (w instanceof HasContextMenu) {
		w.addDomHandler(new MouseUpHandler() {
			@Override
			public void onMouseUp(MouseUpEvent event) {
				if (event.getNativeButton() == NativeEvent.BUTTON_RIGHT) {
					showMenu((HasContextMenu) w, event.getClientX(), event.getClientY());
				}
			}
		}, MouseUpEvent.getType());
	}
	widgetPanel.add(w, left, top);

	// Register the drag handler
	if (dragController != null) {
		registerDragHandler(shape);
	}

	// If the is mouse is over the widget, clear the topCanvas
	w.addDomHandler(new MouseOverHandler() {
		@Override
		public void onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent arg0) {
			topCanvas.clear();
			mousePoint.setLeft(-30);
			mousePoint.setTop(-30);
		}
	}, com.google.gwt.event.dom.client.MouseOverEvent.getType());
	shape.draw();

	// Send event
	handlerManager.fireEvent(new NewFunctionEvent(w));
	return shape;
}
 
Example #5
Source File: HandlerPanel.java    From appinventor-extensions with Apache License 2.0 4 votes vote down vote up
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #6
Source File: P.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
	return addHandler(handler, MouseOverEvent.getType());
}
 
Example #7
Source File: ToggleButtonWidget.java    From swellrt with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #8
Source File: ClickableDivPanel.java    From swellrt with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #9
Source File: ContextField.java    From bitcoin-transaction-explorer with MIT License 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(final MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #10
Source File: AbstractInput.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
	return this.addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #11
Source File: ListItem.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
	return this.addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #12
Source File: Anchor.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
	return this.addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #13
Source File: ToggleButtonWidget.java    From incubator-retired-wave with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #14
Source File: ClickableDivPanel.java    From incubator-retired-wave with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
  return addDomHandler(handler, MouseOverEvent.getType());
}
 
Example #15
Source File: HoverHelper.java    From swellrt with Apache License 2.0 2 votes vote down vote up
/**
 * Adds handlers to this hoverable.
 *
 * @param mouseOverHandler a mouse-over handler
 * @param mouseOutHandler a mouse-out handler
 */
void addHandlers(MouseOverHandler mouseOverHandler, MouseOutHandler mouseOutHandler);
 
Example #16
Source File: HoverHelper.java    From incubator-retired-wave with Apache License 2.0 2 votes vote down vote up
/**
 * Adds handlers to this hoverable.
 *
 * @param mouseOverHandler a mouse-over handler
 * @param mouseOutHandler a mouse-out handler
 */
void addHandlers(MouseOverHandler mouseOverHandler, MouseOutHandler mouseOutHandler);