Search in sources :

Example 1 with BlurEvent

use of com.google.gwt.event.dom.client.BlurEvent in project che by eclipse.

the class EditDebugConfigurationsViewImpl method createButtons.

private void createButtons() {
    saveButton = createButton(coreLocale.save(), "window-edit-debug-configurations-save", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onSaveClicked();
        }
    });
    saveButton.addStyleName(Window.resources.windowCss().primaryButton());
    overFooter.add(saveButton);
    cancelButton = createButton(coreLocale.cancel(), "window-edit-debug-configurations-cancel", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCancelClicked();
        }
    });
    overFooter.add(cancelButton);
    debugButton = createButton(coreLocale.debug(), "window-edit-debug-configurations-debug", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onDebugClicked();
        }
    });
    overFooter.add(debugButton);
    closeButton = createButton(coreLocale.close(), "window-edit-debug-configurations-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCloseClicked();
        }
    });
    closeButton.addDomHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent blurEvent) {
            //set default focus
            selectText(filterInputField.getElement());
        }
    }, BlurEvent.getType());
    addButtonToFooter(closeButton);
    Element dummyFocusElement = DOM.createSpan();
    dummyFocusElement.setTabIndex(0);
    getFooter().getElement().appendChild(dummyFocusElement);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Example 2 with BlurEvent

use of com.google.gwt.event.dom.client.BlurEvent in project che by eclipse.

the class EditCommandsViewImpl method createButtons.

private void createButtons() {
    saveButton = createButton(coreLocale.save(), "window-edit-commands-save", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onSaveClicked();
        }
    });
    saveButton.addStyleName(Window.resources.windowCss().primaryButton());
    buttonsPanel.add(saveButton);
    cancelButton = createButton(coreLocale.cancel(), "window-edit-commands-cancel", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCancelClicked();
        }
    });
    buttonsPanel.add(cancelButton);
    closeButton = createButton(coreLocale.close(), "window-edit-commands-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCloseClicked();
        }
    });
    closeButton.addDomHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent blurEvent) {
            //set default focus
            selectText(filterInputField.getElement());
        }
    }, BlurEvent.getType());
    addButtonToFooter(closeButton);
    Element dummyFocusElement = DOM.createSpan();
    dummyFocusElement.setTabIndex(0);
    getFooter().getElement().appendChild(dummyFocusElement);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Example 3 with BlurEvent

use of com.google.gwt.event.dom.client.BlurEvent in project perun by CESNET.

the class ExtendedPasswordBox method buildWidget.

/**
	 * Build widget itself
	 */
private void buildWidget() {
    box.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.addBlurHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.getElement().setClassName("passwordbox" + counter++);
    setCutCopyPasteHandler("passwordbox" + counter);
    errorText.setVisible(false);
    errorText.setStyleName("inputFormInlineComment");
    errorText.addStyleName("serverResponseLabelError");
    errorText.addStyleName("input-status-error-padding");
    sp.setWidget(box);
    sp.getElement().appendChild(errorText.getElement());
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) BlurEvent(com.google.gwt.event.dom.client.BlurEvent) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler)

Example 4 with BlurEvent

use of com.google.gwt.event.dom.client.BlurEvent in project perun by CESNET.

the class ExtendedTextArea method buildWidget.

/**
	 * Build widget itself
	 */
private void buildWidget() {
    box.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            if (validator != null) {
                validator.validateTextArea();
            }
        }
    });
    box.addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
            if (validator != null) {
                validator.validateTextArea();
            }
        }
    });
    box.addBlurHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent event) {
            if (validator != null) {
                validator.validateTextArea();
            }
        }
    });
    box.getElement().setClassName("textarea" + counter++);
    setCutCopyPasteHandler("textarea" + counter);
    errorText.setVisible(false);
    errorText.setStyleName("inputFormInlineComment");
    errorText.addStyleName("serverResponseLabelError");
    errorText.addStyleName("input-status-error-padding");
    sp.setWidget(box);
    sp.getElement().appendChild(errorText.getElement());
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) BlurEvent(com.google.gwt.event.dom.client.BlurEvent) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler)

Example 5 with BlurEvent

use of com.google.gwt.event.dom.client.BlurEvent in project perun by CESNET.

the class ExtendedTextBox method buildWidget.

/**
	 * Build widget itself
	 */
private void buildWidget() {
    box.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.addBlurHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent event) {
            if (validator != null) {
                validator.validateTextBox();
            }
        }
    });
    box.getElement().setClassName("textbox" + counter++);
    setCutCopyPasteHandler("textbox" + counter);
    errorText.setVisible(false);
    errorText.setStyleName("inputFormInlineComment");
    errorText.addStyleName("serverResponseLabelError");
    errorText.addStyleName("input-status-error-padding");
    sp.setWidget(box);
    sp.getElement().appendChild(errorText.getElement());
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) BlurEvent(com.google.gwt.event.dom.client.BlurEvent) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler)

Aggregations

BlurEvent (com.google.gwt.event.dom.client.BlurEvent)9 BlurHandler (com.google.gwt.event.dom.client.BlurHandler)9 KeyUpEvent (com.google.gwt.event.dom.client.KeyUpEvent)5 KeyUpHandler (com.google.gwt.event.dom.client.KeyUpHandler)5 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)3 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)3 Element (com.google.gwt.dom.client.Element)2 SpanElement (com.google.gwt.dom.client.SpanElement)2 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)1 FocusEvent (com.google.gwt.event.dom.client.FocusEvent)1 FocusHandler (com.google.gwt.event.dom.client.FocusHandler)1 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)1 KeyPressHandler (com.google.gwt.event.dom.client.KeyPressHandler)1 Command (com.google.gwt.user.client.Command)1 Element (com.google.gwt.user.client.Element)1 TextBox (com.google.gwt.user.client.ui.TextBox)1 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)1 AddMember (cz.metacentrum.perun.webgui.json.groupsManager.AddMember)1 CreateMember (cz.metacentrum.perun.webgui.json.membersManager.CreateMember)1 FindCompleteRichMembers (cz.metacentrum.perun.webgui.json.membersManager.FindCompleteRichMembers)1