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

项目:gwt-material    文件:MaterialWidgetTestCase.java   
protected <H extends HasAllFocusHandlers & HasEnabled> void checkFocusAndBlurEvents(H widget) {
    // Check Focus
    final boolean[] isFocusFired = {false};
    widget.addFocusHandler(focusEvent -> isFocusFired[0] = true);
    fireFocusEvent(widget);

    // Check Blur
    final boolean[] isBlurFired = {false};
    widget.addBlurHandler(blurEvent -> isBlurFired[0] = true);
    fireBlurEvent(widget);

    assertEquals(widget.isEnabled(), isFocusFired[0]);
    assertEquals(widget.isEnabled(), isBlurFired[0]);
}
项目:qafe-platform    文件:LabeledTextAreaFieldWidget.java   
public HandlerRegistration addFocusHandler(FocusHandler handler) {
    if (uiObject instanceof HasAllFocusHandlers) {
        return ((HasAllFocusHandlers)uiObject).addFocusHandler(handler);
    }
    return null;
}
项目:qafe-platform    文件:LabeledTextAreaFieldWidget.java   
public HandlerRegistration addBlurHandler(BlurHandler handler) {
    if (uiObject instanceof HasAllFocusHandlers) {
        return ((HasAllFocusHandlers)uiObject).addBlurHandler(handler);
    }
    return null;
}
项目:qafe-platform    文件:LabeledTextFieldWidget.java   
public HandlerRegistration addFocusHandler(FocusHandler handler) {
    if (textbox instanceof HasAllFocusHandlers){
        return ((HasAllFocusHandlers)textbox).addFocusHandler(handler);
    }
    return null;
}
项目:qafe-platform    文件:LabeledTextFieldWidget.java   
public HandlerRegistration addBlurHandler(BlurHandler handler) {
    if (textbox instanceof HasAllFocusHandlers){
        return ((HasAllFocusHandlers)textbox).addBlurHandler(handler);
    }
    return null;
}