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);
}
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);
}
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());
}
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());
}
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());
}
Aggregations