/** * Synthesize a change event on the focused input element if the value has * changed. * * @param widget the {@link Widget} containing the element */ private static void maybeFireChangeEvent(Widget widget) { if (focusedInput == null) { return; } Object newValue = getInputValue(focusedInput); if (!newValue.equals(focusedInputValue)) { // Save the new value in case it changes again. focusedInputValue = newValue; // Fire a synthetic event to the input element. Element target = focusedInput; Event changeEvent = Document.get().createChangeEvent().cast(); dispatchCellEvent(widget, target, Event.ONCHANGE, changeEvent); } }
Event blurEvent = Document.get().createFocusEvent().cast(); dispatchCellEvent(widget, target, Event.ONBLUR, null); } else if (BrowserEvents.LOAD.equals(type) || BrowserEvents.ERROR.equals(type)) {
/** * Returns the scale factor from previous zoom operations that was in place before the zoom operation occurred. * @return the scale factor from previous zoom operations */ public final float getPreviousScale() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getPreviousScale(); };
/** * Returns the translation values that will be in place after the zoom operation * has been processed. The {@link org.vectomatic.dom.svg.OMSVGPoint} * object is read only. * @return the translation values that will be in place after the zoom operation has been processed. */ public final OMSVGPoint getNewTranslate() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getNewTranslate(); };
/** * Returns the scale factor that will be in place after the zoom operation has been processed. * @return the scale factor that will be in place after the zoom operation has been processed */ public final float getNewScale() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getNewScale(); };
/** * Specifies some detail information about the Event, depending on the type of the event. * For this event type, indicates the repeat number for the animation. * @return the repeat number for the animation */ public final int getDetail() { return ((NativeTimeEvent)getNativeEvent().cast()).getDetail(); } }
/** * Specifies some detail information about the Event, depending on the type of the event. * For this event type, indicates the repeat number for the animation. * @return the repeat number for the animation */ public final int getDetail() { return ((NativeTimeEvent)getNativeEvent().cast()).getDetail(); } }
@Override public void onClick(final ClickEvent clickEvent) { JavaScriptObject obj = clickEvent.getNativeEvent().cast(); JavaScriptObject data = getClickPoints(obj, nativeCanvas); if (data != null) DataSelectionEvent.fire(Chart.this, Chart.this, data); } });
/** * Returns the specified zoom rectangle in screen units. * @return the specified zoom rectangle in screen units. */ public final OMSVGRect getZoomRectScreen() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getZoomRectScreen(); }
/** * Returns the translation values from previous zoom operations that * were in place before the zoom operation occurred. The {@link org.vectomatic.dom.svg.OMSVGPoint} * object is read only. * @return the translation values from previous zoom operations */ public final OMSVGPoint getPreviousTranslate() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getPreviousTranslate(); };
/** * Returns the specified zoom rectangle in screen units. * @return the specified zoom rectangle in screen units. */ public final OMSVGRect getZoomRectScreen() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getZoomRectScreen(); }
/** * Returns the scale factor from previous zoom operations that was in place before the zoom operation occurred. * @return the scale factor from previous zoom operations */ public final float getPreviousScale() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getPreviousScale(); };
/** * Returns the translation values from previous zoom operations that * were in place before the zoom operation occurred. The {@link org.vectomatic.dom.svg.OMSVGPoint} * object is read only. * @return the translation values from previous zoom operations */ public final OMSVGPoint getPreviousTranslate() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getPreviousTranslate(); };
/** * Returns the scale factor that will be in place after the zoom operation has been processed. * @return the scale factor that will be in place after the zoom operation has been processed */ public final float getNewScale() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getNewScale(); };
/** * Returns the translation values that will be in place after the zoom operation * has been processed. The {@link org.vectomatic.dom.svg.OMSVGPoint} * object is read only. * @return the translation values that will be in place after the zoom operation has been processed. */ public final OMSVGPoint getNewTranslate() { return ((NativeSVGZoomEvent)getNativeEvent().cast()).getNewTranslate(); };
@Override protected void onTap(TouchData touchData) { LogicalTabPanel.this.onTap(touchData.getLastNativeEvent().<Event>cast()); super.onTap(touchData); }
protected void onKeyUp(NativeEvent ke) { NativeTreeEvent e = ke.cast(); e.preventDefault(); Node prev = prev(); if (prev != null) { doSingleSelect(prev, false); tree.scrollIntoView(prev); } }
@Override public void onClick( ClickEvent event ) { Cell cell = table.getCellForEvent( event.getNativeEvent().<Event>cast() ); if( cell == null ) return; //check our column if( cell.getCellIndex() != getColumnIdx() ) return; ImageClickColumn.this.onClick( cell ); } };
@Override public void onClick( ClickEvent event ) { Cell cell = table.getCellForEvent( event.getNativeEvent().<Event>cast() ); if( cell == null ) return; //check our column if( cell.getCellIndex() != getColumnIdx() ) return; ImageClickColumn.this.onClick( cell ); } };
@Override public void onKeyDown(KeyDownEvent event) { VUI vui = getConnection().getUIConnector().getWidget(); if (vui.actionHandler != null) { vui.actionHandler.handleKeyboardEvent( (Event) event.getNativeEvent().cast()); } } }, KeyDownEvent.getType());