InputList.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:putnami-web-toolkit 作者:
private void resetFocusHandler() {
    this.registrationCollection.removeHandler();
    boolean hasError = this.hasErrors();
    if (!hasError && !this.focused) {
        this.setTabIndex(0);
        this.registrationCollection.add(this.addFocusHandler(this));
    } else if (hasError && !this.focused) {
        this.setTabIndex(-1);
        if (this.input instanceof HasFocusHandlers) {
            this.registrationCollection.add(((HasFocusHandlers) this.input).addFocusHandler(this));
        }
    } else {
        this.setTabIndex(-1);
        if (this.input instanceof HasBlurHandlers) {
            this.registrationCollection.add(((HasBlurHandlers) this.input).addBlurHandler(this));
        }
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            @Override
            public void execute() {
                if (InternalListItem.this.input instanceof Focusable) {
                    ((Focusable) InternalListItem.this.input).setFocus(true);
                }
            }
        });
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号