public void onMouseOut(MouseOutEvent event) { if (service.getIndexStateService().isEnabled(index)) { for (MouseOutHandler handler : outHandlers) { handler.onMouseOut(event); } } }
@Override public void onMouseOut(MouseOutEvent event) { if (controller != null) { controller.onMouseOut(event); if (!controller.isBusy()) { panController.onMouseOut(event); } } else { panController.onMouseOut(event); } }
public ConsoleDisplay() { super(new AbsolutePanel(), CLASS_NAME); getElement().setId("consoleDisplayWrapper"); // Create display panel where screen is actually loaded display = new AbsolutePanel(); display.addStyleName("portrait"); display.getElement().setId("consoleDisplay"); // Add display to the wrapper ((AbsolutePanel)getWidget()).add(display, 0, 0); // Add move handlers which are only used on this display component if(BrowserUtils.isMobile) { this.addDomHandler(this, TouchMoveEvent.getType()); } else { this.addDomHandler(this, MouseMoveEvent.getType()); this.addDomHandler(this, MouseOutEvent.getType()); } }
private void registerHandlers() { if(BrowserUtils.isMobile) { registerHandler(this.addDomHandler(this, TouchStartEvent.getType())); registerHandler(this.addDomHandler(this, TouchEndEvent.getType())); } else { registerHandler(this.addDomHandler(this, MouseDownEvent.getType())); registerHandler(this.addDomHandler(this, MouseUpEvent.getType())); registerHandler(this.addDomHandler(this, MouseOutEvent.getType())); } registerHandler(this.addHandler(this, DragStartEvent.getType())); registerHandler(this.addHandler(this, DragMoveEvent.getType())); registerHandler(this.addHandler(this, DragEndEvent.getType())); registerHandler(this.addHandler(this, DragCancelEvent.getType())); }
private TabBarItemComponent createSystemTabItem(EnumSystemTabItemType itemType) { TabBarItem tabBarItem = null; TabBarItemComponent component = null; AutoBean<TabBarItem> TabBarItemBean = AutoBeanService.getInstance().getFactory().tabBarItem(); tabBarItem = TabBarItemBean.as(); switch (itemType) { case PREVIOUS: tabBarItem.setName("<"); break; case NEXT: tabBarItem.setName(">"); break; } component = new TabBarItemComponent(tabBarItem, itemType); // Add handlers as not created by usual mechanism if(BrowserUtils.isMobile) { systemTabHandlers.add(component.addDomHandler(this, TouchStartEvent.getType())); systemTabHandlers.add(component.addDomHandler(this, TouchEndEvent.getType())); } else { systemTabHandlers.add(component.addDomHandler(this, MouseDownEvent.getType())); systemTabHandlers.add(component.addDomHandler(this, MouseUpEvent.getType())); systemTabHandlers.add(component.addDomHandler(this, MouseOutEvent.getType())); } systemTabHandlers.add(component.addHandler(component, TapEvent.getType())); return component; }
@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()); }
public void onMouseOut(MouseOutEvent event) { Widget widget = (Widget) event.getSource(); if (doHilite) { GwtUtil.setStyle(widget, "backgroundColor", normalBackground); GwtUtil.setStyle(widget, "border", "1px solid " + normalBackground); } mouseOverTimer.cancel(); }
public void setMouseExited(JavaScriptObject aValue) { if (mouseExited != aValue) { if (mouseOutReg != null) { mouseOutReg.removeHandler(); mouseOutReg = null; } mouseExited = aValue; if (mouseExited != null) { MouseOutHandler handler = new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { if (mouseExited != null) { event.stopPropagation(); executeEvent(mouseExited, EventsPublisher.publish(event)); } } }; if (component instanceof Widget) { mouseOutReg = ((Widget) component).addDomHandler(handler, MouseOutEvent.getType()); } else if (component instanceof HasMouseOutHandlers) { mouseOutReg = ((HasMouseOutHandlers) component).addMouseOutHandler(handler); } } } }
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; } }
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(); } }
@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); }
/** * 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(); } }
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(); } } }
private MouseOutHandler getMouseOutHandler(final Anchor anchor) { return new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { anchor.removeStyleName(ThemeStyles.get().style().borderBottom()); } }; }
private void registerHandlers() { if(BrowserUtils.isMobile) { registerHandler(this.addDomHandler(this, TouchStartEvent.getType())); registerHandler(this.addDomHandler(this, TouchEndEvent.getType())); registerHandler(this.addDomHandler(this, TouchMoveEvent.getType())); } else { registerHandler(this.addDomHandler(this, MouseDownEvent.getType())); registerHandler(this.addDomHandler(this, MouseUpEvent.getType())); registerHandler(this.addDomHandler(this, MouseOutEvent.getType())); registerHandler(this.addDomHandler(this, MouseMoveEvent.getType())); } }
private void onSocialButtonMouseOutHandler(MouseOutEvent event) { MaterialImage source = (MaterialImage)event.getSource(); source.setBackgroundColor(Color.AMBER); }
public void onMouseOut(MouseOutEvent event) { ChartState chartInfo = getChartState(event); Chart chart = chartInfo.chart; chart.setAnimating(false); chart.setCursor(Cursor.DEFAULT); chart.setHover(-1,-1); //((DefaultXYPlot)chart.getPlot()).redraw(true); chartInfo.setHandled(true); chartInfo.getCompoundUIAction().setSource(null); }
public void onMouseOut(MouseOutEvent event) { if(helpBalloon != null) { // restore the tool tip widget.setTitle(tooltipText); // hide the help balloon; helpBalloon.hide(); } }
ScrollValuePopup(final int x, final int y, int dy, CircuitElm e, CirSim s) { super(); myElm=e; deltaY=0; sim=s; sim.pushUndo(); vp=new VerticalPanel(); setWidget(vp); setupValues(); vp.add(new Label(name)); labels=new Label[labMax]; for (int i=0; i<labMax; i++) { labels[i] = new Label("---"); labels[i].setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); if (i==2) labels[i].addStyleDependentName("selected"); else if (i==1 || i==3) labels[i].addStyleDependentName("1off"); else labels[i].addStyleDependentName("2off"); vp.add(labels[i]); } doDeltaY(dy); this.addDomHandler(this, MouseOutEvent.getType()); this.addDomHandler(this, MouseWheelEvent.getType()); this.addDomHandler(this, MouseDownEvent.getType()); // this.addDomHandler(this, KeyPressEvent.getType()); setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { int left = Math.max(0, (x - offsetWidth/4)); int top = Math.max(0, y - 7*offsetHeight/12); setPopupPosition(left, top); } }); }
public void onMouseOut(MouseOutEvent e){ // GWT.log("Out"); // e.preventDefault(); if (dragging) return; if (enabled && attachedElm!=null && attachedElm.isMouseElm()) CircuitElm.sim.setMouseElm(null); }
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()); }
/** Mouse Out handler. */ @Override public void onMouseOut(MouseOutEvent event) { if (!enabled) { return; } if (selected) { panel.setStyleName(toolbarResources.toolbar().iconButtonPanelSelected()); } else { panel.setStyleName(toolbarResources.toolbar().iconButtonPanel()); } }
public void onMouseOut(MouseOutEvent event) { Widget widget = (Widget)event.getSource(); DOM.setStyleAttribute(widget.getElement(), "backgroundColor", "#ddd"); DOM.setStyleAttribute(widget.getElement(), "border", "1px solid #ddd"); mouseOverTimer.cancel(); }
@EventHandler("headerPanel") private void onHeaderMouseOut(MouseOutEvent event) { if (mouseOver) { headerPanel.setClassName("acl-header-panel"); mouseOver = false; } }
private void onMouseOutHidePopup() { this.addDomHandler(new MouseOutHandler() { public void onMouseOut(MouseOutEvent event) { hide(); } }, MouseOutEvent.getType()); setAutoHideEnabled(false); }
public static MouseOutHandler createOnMouseExitListener(final EventListenerGVO ev, final List<InputVariableGVO> input) { return new MouseOutHandler() { public void onMouseOut(MouseOutEvent event) { Map<String,String> mouseInfo = getMouseInfo(event); CallbackHandler.createCallBack(event.getSource(), QAMLConstants.EVENT_ONMOUSE_EXIT, ev, input, mouseInfo); } }; }
@Override public void onMouseOut(final MouseOutEvent event) { if (selectedField == null) { popupShowTimer.cancel(); delayedHide(); } }
/** * Generates a mouse out handler for a specific row and column. * * @param row the row. * @param column the column. * @return a mouse out handler. */ private MouseOutHandler createMouseOutHandler(final int row, final int column) { return new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { mouseOut(row, column); } }; }
@Override public void onMouseOut(MouseOutEvent event) { // System.out.println("onMouseLeave()"); if (lastStroke != null) { if (lastStroke.size() >= 2) { strokes.add(lastStroke); strokeCanvasListener.onStrokeFinished(); } lastStroke = null; updateCanvas(); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) { eventHandlers.put(handler, (DomEvent.Type) MouseOutEvent.getType()); if (canvas != null) { canvas.addDomHandler(handler, MouseOutEvent.getType()); } return null; }
public void onMouseOut(MouseOutEvent event) { if (service.getEditingState() == GeometryEditState.IDLE) { idleController.onMouseOut(event); } else if (service.getEditingState() == GeometryEditState.DRAGGING) { dragController.onMouseOut(event); } else if (service.getEditingState() == GeometryEditState.INSERTING) { insertController.onMouseOut(event); } }
@Override public void onMouseOut(MouseOutEvent event) { if (zooming) { zoomToRectangleController.onMouseOut(event); } else { stopPanning(null); } }
@Override public void onMouseOut(MouseOutEvent event) { if (shape instanceof Shape) { ((Shape) shape).setFillColor("white"); ((Shape) shape).setStrokeColor("black"); ((Shape) shape).setStrokeWidth(1); } }
@Override public void onMouseOut(MouseOutEvent event) { super.onMouseOut(event); if (selectionMethod == SelectionMethod.CLICK_AND_DRAG) { selectionRectangleController.onMouseOut(event); } }
public void onMouseOut(MouseOutEvent event) { if (dragging) { dragging = false; shrinkLayout(); int index = viewPort.getResolutionCount() - viewPort.getResolutionIndex(viewPort.getResolution()) - 1; int handleY = getBaseTop() + ZOOMBUTTON_SIZE + 1 + (index * ZOOMSTEP_HEIGHT); zoomHandle.getElement().getStyle().setTop(handleY, Unit.PX); } }
/** * 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 ""; }
private void registerHoverEventHandlers() { handlerRegistrationManager.register( panel.addDomHandler(mouseOverEvent -> stopTimeout(), MouseOverEvent.getType()) ); handlerRegistrationManager.register( panel.addDomHandler(mouseOutEvent -> startTimeout(), MouseOutEvent.getType()) ); }