use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class ExpandEditorAction method createCustomComponent.
@Override
public Widget createCustomComponent(Presentation presentation) {
if (buttonPanel != null) {
return buttonPanel;
}
final Element tooltip = DOM.createSpan();
tooltip.setInnerHTML(constant.actionExpandEditorTitle());
buttonPanel = new FlowPanel();
buttonPanel.addStyleName(resources.coreCss().editorFullScreen());
button = new FlowPanel();
button.getElement().setInnerHTML(FontAwesome.EXPAND);
button.addDomHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
toggleExpand();
}
}, ClickEvent.getType());
buttonPanel.add(button);
buttonPanel.getElement().appendChild(tooltip);
buttonPanel.addDomHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
final Element panel = event.getRelativeElement();
tooltip.getStyle().setProperty("top", (panel.getAbsoluteTop() + panel.getOffsetHeight() + 9) + "px");
tooltip.getStyle().setProperty("right", (Document.get().getClientWidth() - panel.getAbsoluteRight() - 2) + "px");
}
}, MouseOverEvent.getType());
return buttonPanel;
}
use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class BaseView method addMenuButton.
/**
* Adds part menu button.
*/
private void addMenuButton() {
final ToolButton menuButton = new ToolButton(FontAwesome.COG + " " + FontAwesome.CARET_DOWN);
menuButton.getElement().setAttribute("name", "workBenchIconMenu");
menuButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
int left = getAbsoluteLeft(menuButton.getElement());
int top = getAbsoluteTop(menuButton.getElement());
delegate.onPartMenu(left, top + 21);
}
});
toolbarHeader.addEast(menuButton, 25);
if (menuButton.getElement() instanceof elemental.dom.Element) {
Tooltip.create((elemental.dom.Element) menuButton.getElement(), PositionController.VerticalAlign.BOTTOM, PositionController.HorizontalAlign.MIDDLE, "Panel options");
}
}
use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class ProjectExplorerViewImpl method initGoIntoBackButton.
private void initGoIntoBackButton() {
goBackButton = new ToolButton(FontAwesome.ARROW_CIRCLE_O_LEFT);
goBackButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
tree.getGoInto().reset();
}
});
goBackButton.ensureDebugId(GO_BACK_BUTTON_ID);
Tooltip.create((elemental.dom.Element) goBackButton.getElement(), BOTTOM, MIDDLE, "Go Back");
addToolButton(goBackButton);
}
use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class ChangedListViewImpl method createButtons.
private void createButtons() {
changeViewModeButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
delegate.onChangeViewModeButtonClicked();
}
});
expandButton.setTitle(locale.changeListExpandCollapseAllButtonTitle());
expandButton.getElement().setInnerHTML(FontAwesome.EXPAND);
expandButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
delegate.onExpandButtonClicked();
}
});
collapseButton.setTitle(locale.changeListCollapseAllButtonTitle());
collapseButton.getElement().setInnerHTML(FontAwesome.COMPRESS);
collapseButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
delegate.onCollapseButtonClicked();
}
});
Button btnClose = createButton(locale.buttonClose(), "git-compare-btn-close", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onCloseClicked();
}
});
addButtonToFooter(btnClose);
btnCompare = createButton(locale.buttonCompare(), "git-compare-btn-compare", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onCompareClicked();
}
});
addButtonToFooter(btnCompare);
}
use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.
the class RecipeWidgetImplTest method tagShouldBeSelected.
@Test
public void tagShouldBeSelected() {
ClickEvent clickEvent = mock(ClickEvent.class);
tag.setDelegate(delegate);
tag.onClick(clickEvent);
verify(delegate).onTagClicked(tag);
}
Aggregations