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

EventsExecutor.java 文件源码 项目:platypus-js 阅读 23 收藏 0 点赞 0 评论 0
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));
                    }
                }

            });
        }
    }
}
BeanValidationInitializer.java 文件源码 项目:gwt-bean-validators 阅读 20 收藏 0 点赞 0 评论 0
/**
 * 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);
  }
}
Validator.java 文件源码 项目:hexa.tools 阅读 27 收藏 0 点赞 0 评论 0
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 );
}
GWTWidgets.java 文件源码 项目:r01fb 阅读 23 收藏 0 点赞 0 评论 0
/**
 * 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);
        }
    }
}
AbstractDecorator.java 文件源码 项目:gwt-bean-validators 阅读 21 收藏 0 点赞 0 评论 0
@Override
public HandlerRegistration addKeyUpHandler(final KeyUpHandler pkeyUpHandler) {
  if (this.contents.getWidget() instanceof HasKeyUpHandlers) {
    return ((HasKeyUpHandlers) this.contents.getWidget()).addKeyUpHandler(pkeyUpHandler);
  } else {
    return null;
  }
}
ExampleEntryPoint.java 文件源码 项目:autorest 阅读 20 收藏 0 点赞 0 评论 0
private static Observable<KeyUpEvent> keyUp(HasKeyUpHandlers source) {
    return Observable.create(s -> register(s, source.addKeyUpHandler(s::onNext)));
}
HomeView.java 文件源码 项目:rosa 阅读 22 收藏 0 点赞 0 评论 0
public HasKeyUpHandlers getUserUrlKeyUpHandlers() {
    return user_textbox;
}
HomePanelPresenter.java 文件源码 项目:rosa 阅读 23 收藏 0 点赞 0 评论 0
HasKeyUpHandlers getUserUrlKeyUpHandlers();


问题


面经


文章

微信
公众号

扫码关注公众号