List of usage examples for com.google.gwt.dom.client BrowserEvents MOUSEOUT
String MOUSEOUT
To view the source code for com.google.gwt.dom.client BrowserEvents MOUSEOUT.
Click Source Link
From source file:org.eclipse.hawkbit.ui.rollout.groupschart.client.GroupsPieChartWidget.java
License:Open Source License
private void draw() { if (svg == null || groupTargetCounts == null || totalTargetCount == null) { return;//from w w w.j a v a 2s .c o m } final Array<Arc> dataArray = Array.create(); PieArc pie = getPie(unassignedTargets, totalTargetCount, 0); dataArray.push(pie.getArc()); double lastAngle = pie.getEndAngle(); for (int i = 0; i < groupTargetCounts.size(); i++) { final PieArc arcEntry = getPie(groupTargetCounts.get(i), totalTargetCount, lastAngle); dataArray.push(arcEntry.getArc()); lastAngle = arcEntry.getEndAngle(); } UpdateSelection pies = pieGroup.selectAll(".pie").data(dataArray); pies.enter().append("path").classed("pie", true).on(BrowserEvents.MOUSEOVER, new DatumFunction<Void>() { @Override public Void apply(Element context, Value d, int index) { Array<Double> point = arc.centroid(d.as(Arc.class), index); double x = point.getNumber(0); double y = point.getNumber(1); if (index == 0) { updateHoverText("Unassigned: " + unassignedTargets, x, y); } else { updateHoverText(index + ": " + groupTargetCounts.get(index - 1), x, y); } return null; } }).on(BrowserEvents.MOUSEOUT, new DatumFunction<Void>() { @Override public Void apply(Element context, Value d, int index) { infoText.attr(ATTR_VISIBILITY, "hidden"); return null; } }); pies.exit().remove(); pies.attr("d", arc); }
From source file:org.pepstock.jem.gwt.client.commons.TextFilteredCell.java
License:Open Source License
@Override public Set<String> getConsumedEvents() { // get consumed events from super Set<String> consumedEvents = super.getConsumedEvents(); if (consumedEvents == null) { consumedEvents = new HashSet<String>(); }/* w ww.java 2s . c o m*/ // add my custom consumed event consumedEvents.add(BrowserEvents.MOUSEOVER); consumedEvents.add(BrowserEvents.MOUSEOUT); consumedEvents.add(BrowserEvents.CLICK); // return all return consumedEvents; }
From source file:org.pepstock.jem.gwt.client.commons.TextFilteredCell.java
License:Open Source License
@Override public void onBrowserEvent(com.google.gwt.cell.client.Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); try {/*from w ww . j a v a2s. c om*/ // show filter panel only if there is a right-click event if (BrowserEvents.MOUSEOVER.equals(event.getType())) { // does NOT show the browser context menu if (showable) { showFilterPanel(event); showable = false; } } else if (BrowserEvents.MOUSEOUT.equals(event.getType())) { hideFilterPanel(event); showable = true; } else if (BrowserEvents.CLICK.equals(event.getType())) { hideFilterPanel(event); showable = false; } } catch (Exception e) { LogClient.getInstance().warning(e.getMessage(), e); new Toast(MessageLevel.ERROR, "An error has occoured while displaying FilterPopupPanel", "UI Error!") .show(); } }
From source file:stroom.widget.menu.client.presenter.MenuItemCell.java
License:Apache License
public MenuItemCell(final MenuPresenter menuPresenter) { super(BrowserEvents.CLICK, BrowserEvents.MOUSEOVER, BrowserEvents.MOUSEOUT); this.menuPresenter = menuPresenter; }
From source file:stroom.widget.menu.client.presenter.MenuItemCell.java
License:Apache License
@Override public void onBrowserEvent(final Context context, final Element parent, final Item value, final NativeEvent event, final ValueUpdater<Item> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); if (value != null) { final String eventType = event.getType(); final Element element = getElement(parent); if (value instanceof CommandMenuItem) { if (BrowserEvents.MOUSEOVER.equals(eventType)) { final CommandMenuItem menuItem = (CommandMenuItem) value; if (menuItem.isEnabled()) { menuPresenter.onMouseOver(menuItem, element); if (menuPresenter.isHover(menuItem)) { element.addClassName(MENU_RESOURCES.cellTableStyle().cellTableHoveredRow()); }/*from w w w . j a va 2s . c om*/ } else { element.removeClassName(MENU_RESOURCES.cellTableStyle().cellTableHoveredRow()); } } else if (BrowserEvents.MOUSEOUT.equals(eventType)) { final CommandMenuItem menuItem = (CommandMenuItem) value; menuPresenter.onMouseOut(menuItem, element); if (!menuPresenter.isHover(menuItem)) { element.removeClassName(MENU_RESOURCES.cellTableStyle().cellTableHoveredRow()); } } else if (BrowserEvents.CLICK.equals(eventType) && ((event.getButton() & NativeEvent.BUTTON_LEFT) != 0)) { final CommandMenuItem menuItem = (CommandMenuItem) value; if (menuItem.isEnabled()) { menuPresenter.onClick(menuItem, element); } } } else if (value instanceof MenuItem) { final MenuItem menuItem = (MenuItem) value; if (BrowserEvents.MOUSEOVER.equals(eventType)) { element.addClassName(MENU_RESOURCES.cellTableStyle().cellTableHoveredRow()); menuPresenter.onMouseOver(menuItem, element); } else if (BrowserEvents.MOUSEOUT.equals(eventType)) { element.removeClassName(MENU_RESOURCES.cellTableStyle().cellTableHoveredRow()); } else if (BrowserEvents.CLICK.equals(eventType) && ((event.getButton() & NativeEvent.BUTTON_LEFT) != 0)) { menuPresenter.onClick(menuItem, element); } } } }