use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class NotificationPopup method createCloseWidget.
/**
* Create close icon widget that contains an close notification icon.
*
* @return {@link SimplePanel} as close icon wrapper
*/
private SimplePanel createCloseWidget() {
SimplePanel closeWrapper = new SimplePanel();
SVGImage closeImage = new SVGImage(resources.closeIcon());
closeImage.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onClose(notification);
}
});
closeWrapper.add(closeImage);
closeWrapper.setStyleName(resources.notificationCss().notificationPopupCloseButtonWrapper());
closeWrapper.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
return closeWrapper;
}
use of com.google.gwt.event.dom.client.ClickEvent 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.ClickEvent 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.ClickEvent in project che by eclipse.
the class ShowReferenceViewImpl method addButtons.
private void addButtons() {
Button cancel = createButton(locale.cancel(), "copy-reference-cancel-button", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
hide();
}
});
addButtonToFooter(cancel);
}
use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class ProjectClasspathViewImpl method createButtons.
private void createButtons() {
doneButton = createPrimaryButton(localization.buttonDone(), "window-edit-configurations-close", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onDoneClicked();
}
});
addButtonToFooter(doneButton);
Element dummyFocusElement = DOM.createSpan();
dummyFocusElement.setTabIndex(0);
getFooter().getElement().appendChild(dummyFocusElement);
}
Aggregations