Search in sources :

Example 6 with MouseUpEvent

use of com.google.gwt.event.dom.client.MouseUpEvent in project pentaho-platform by pentaho.

the class EmailAdminPanelController method prepareTextBox.

private void prepareTextBox(final TextBox textBox, final ChangeHandler changeHandler) {
    textBox.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            changeHandler.onChange(null);
        }
    });
    textBox.addMouseUpHandler(new MouseUpHandler() {

        @Override
        public void onMouseUp(MouseUpEvent event) {
            final String oldValue = textBox.getValue();
            new // set timer for IE 'x' clear input button.
            Timer() {

                @Override
                public void run() {
                    if (!oldValue.equals(textBox.getValue())) {
                        changeHandler.onChange(null);
                    }
                }
            }.schedule(100);
        }
    });
}
Also used : Timer(com.google.gwt.user.client.Timer) KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) MouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler) MouseUpEvent(com.google.gwt.event.dom.client.MouseUpEvent) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler)

Aggregations

MouseUpEvent (com.google.gwt.event.dom.client.MouseUpEvent)6 MouseMoveEvent (com.google.gwt.event.dom.client.MouseMoveEvent)4 MouseUpHandler (com.google.gwt.event.dom.client.MouseUpHandler)4 MouseMoveHandler (com.google.gwt.event.dom.client.MouseMoveHandler)2 Timer (com.google.gwt.user.client.Timer)2 Test (org.junit.Test)2 NodeGestureChangeEvent (com.ait.lienzo.client.core.event.NodeGestureChangeEvent)1 NodeGestureEndEvent (com.ait.lienzo.client.core.event.NodeGestureEndEvent)1 NodeGestureStartEvent (com.ait.lienzo.client.core.event.NodeGestureStartEvent)1 NodeMouseClickEvent (com.ait.lienzo.client.core.event.NodeMouseClickEvent)1 NodeMouseDoubleClickEvent (com.ait.lienzo.client.core.event.NodeMouseDoubleClickEvent)1 NodeMouseDownEvent (com.ait.lienzo.client.core.event.NodeMouseDownEvent)1 NodeMouseMoveEvent (com.ait.lienzo.client.core.event.NodeMouseMoveEvent)1 NodeMouseOutEvent (com.ait.lienzo.client.core.event.NodeMouseOutEvent)1 NodeMouseOverEvent (com.ait.lienzo.client.core.event.NodeMouseOverEvent)1 NodeMouseUpEvent (com.ait.lienzo.client.core.event.NodeMouseUpEvent)1 NodeMouseWheelEvent (com.ait.lienzo.client.core.event.NodeMouseWheelEvent)1 NodeTouchCancelEvent (com.ait.lienzo.client.core.event.NodeTouchCancelEvent)1 NodeTouchEndEvent (com.ait.lienzo.client.core.event.NodeTouchEndEvent)1 NodeTouchMoveEvent (com.ait.lienzo.client.core.event.NodeTouchMoveEvent)1