use of com.google.gwt.event.dom.client.BlurHandler 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.BlurHandler 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.BlurHandler in project drools-wb by kiegroup.
the class ActionSetFieldsPageViewImpl method initialiseValueList.
private void initialiseValueList() {
// Copy value back to model
txtValueList.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(final ValueChangeEvent<String> event) {
final String valueList = txtValueList.getText();
chosenFieldsSelection.setValueList(valueList);
// ValueList is optional, no need to advise of state change
}
});
// Update Default Value widget if necessary
txtValueList.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(final BlurEvent event) {
presenter.assertDefaultValue(availablePatternsSelection, chosenFieldsSelection);
makeDefaultValueWidget();
}
});
}
use of com.google.gwt.event.dom.client.BlurHandler in project kie-wb-common by kiegroup.
the class AssignmentListItemWidgetViewImpl method init.
@PostConstruct
public void init() {
// Configure dataType and customDataType controls
dataTypeComboBox.init(this, false, dataType, customDataType, false, true, CUSTOM_PROMPT, ENTER_TYPE_PROMPT);
// Configure processVar and constant controls
processVarComboBox.init(this, false, processVar, constant, true, true, CONSTANT_PROMPT, ENTER_CONSTANT_PROMPT);
name.setRegExp("^[a-zA-Z0-9\\-\\.\\_]*$", StunnerFormsClientFieldsConstants.INSTANCE.Removed_invalid_characters_from_name(), StunnerFormsClientFieldsConstants.INSTANCE.Invalid_character_in_name());
customDataType.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
int iChar = event.getNativeKeyCode();
if (iChar == ' ') {
event.preventDefault();
}
}
});
name.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
if (!allowDuplicateNames) {
String value = name.getText();
if (isDuplicateName(value)) {
notification.fire(new NotificationEvent(duplicateNameErrorMessage, NotificationEvent.NotificationType.ERROR));
name.setValue("");
ValueChangeEvent.fire(name, "");
}
}
}
});
}
use of com.google.gwt.event.dom.client.BlurHandler in project kie-wb-common by kiegroup.
the class VariableListItemWidgetViewImpl method init.
@PostConstruct
public void init() {
// Configure dataType and customDataType controls
dataTypeComboBox.init(this, true, dataType, customDataType, false, true, CUSTOM_PROMPT, ENTER_TYPE_PROMPT);
name.setRegExp("^[a-zA-Z0-9\\-\\.\\_]*$", "Removed invalid characters from name", "Invalid character in name");
customDataType.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(final KeyDownEvent event) {
int iChar = event.getNativeKeyCode();
if (iChar == ' ') {
event.preventDefault();
}
}
});
name.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(final BlurEvent event) {
if (!allowDuplicateNames) {
String value = name.getText();
if (isDuplicateName(value)) {
notification.fire(new NotificationEvent(duplicateNameErrorMessage, NotificationEvent.NotificationType.ERROR));
name.setValue("");
ValueChangeEvent.fire(name, "");
}
}
notifyModelChanged();
}
});
}
Aggregations