Java 类com.google.gwt.event.dom.client.HasKeyUpHandlers 实例源码

项目:platypus-js    文件:EventsExecutor.java   
public void setKeyReleased(JavaScriptObject aValue) {
    if (keyReleased != aValue) {
        if (keyUpReg != null) {
            keyUpReg.removeHandler();
            keyUpReg = null;
        }
        keyReleased = aValue;
        if (keyReleased != null && component instanceof HasKeyUpHandlers) {
            keyUpReg = ((HasKeyUpHandlers) component).addKeyUpHandler(new KeyUpHandler() {
                @Override
                public void onKeyUp(KeyUpEvent event) {
                    if (keyReleased != null) {
                        event.stopPropagation();
                        executeEvent(keyReleased, EventsPublisher.publish(event));
                    }
                }

            });
        }
    }
}
项目:gwt-bean-validators    文件:BeanValidationInitializer.java   
/**
 * initialize one editor.
 *
 * @param editor editor to initialize
 */
@SuppressWarnings({"rawtypes", "unchecked"})
public void initializeEditors(final Object editor) {
  if (editor instanceof HasValueChangeHandlers && this.valueChangeHandler != null) {
    ((HasValueChangeHandlers) editor).addValueChangeHandler(this.valueChangeHandler);
    // if widget has a value change handler, validate on change
    if (this.validateOnVueChangeHandler != null) {
      ((HasValueChangeHandlers) editor).addValueChangeHandler(this.validateOnVueChangeHandler);
    }
  }
  // if widget has a key up handler, validate on key up
  if (editor instanceof HasKeyUpHandlers && this.validateOnKeyUpHandler != null) {
    ((HasKeyUpHandlers) editor).addKeyUpHandler(this.validateOnKeyUpHandler);
  }
  // try to submit form on return
  if (editor instanceof HasKeyPressHandlers && this.commitOnReturnHandler != null) {
    ((HasKeyPressHandlers) editor).addKeyPressHandler(this.commitOnReturnHandler);
  }
}
项目:hexa.tools    文件:Validator.java   
public void setEditor( T editor, boolean fShowCancel )
{
    m_table.clear();

    m_editor = editor;

    if( m_editor != null )
    {
        m_table.setWidget( 0, 0, m_editor );

        if( m_editor instanceof HasKeyUpHandlers )
            ((HasKeyUpHandlers) m_editor).addKeyUpHandler( this );

        if( m_editor instanceof Focusable )
            ((Focusable) m_editor).setFocus( true );
    }

    m_table.setWidget( 0, 1, m_okBut );
    if( fShowCancel )
        m_table.setWidget( 0, 2, m_cancelBut );
}
项目:r01fb    文件:GWTWidgets.java   
/**
 * Sets the KeyUp() event handler in many widgets
 * @param handler the handler
 * @param widgets the widgets
 */
public static void addKeyUpHandler(final KeyUpHandler handler,final HasKeyUpHandlers... widgets) {
    if (handler != null && widgets != null && widgets.length > 0) {
        for (HasKeyUpHandlers w : widgets) {
            if (w != null) w.addKeyUpHandler(handler);
        }
    }
}
项目:gwt-bean-validators    文件:AbstractDecorator.java   
@Override
public HandlerRegistration addKeyUpHandler(final KeyUpHandler pkeyUpHandler) {
  if (this.contents.getWidget() instanceof HasKeyUpHandlers) {
    return ((HasKeyUpHandlers) this.contents.getWidget()).addKeyUpHandler(pkeyUpHandler);
  } else {
    return null;
  }
}
项目:autorest    文件:ExampleEntryPoint.java   
private static Observable<KeyUpEvent> keyUp(HasKeyUpHandlers source) {
    return Observable.create(s -> register(s, source.addKeyUpHandler(s::onNext)));
}
项目:rosa    文件:HomeView.java   
public HasKeyUpHandlers getUserUrlKeyUpHandlers() {
    return user_textbox;
}
项目:rosa    文件:HomePanelPresenter.java   
HasKeyUpHandlers getUserUrlKeyUpHandlers();