use of com.google.gwt.dom.client.Element 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);
}
use of com.google.gwt.dom.client.Element 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.dom.client.Element in project che by eclipse.
the class ResetToCommitViewImpl method addDescription.
/**
* Add description to radio button title.
*
* @param radioItem
* radio button
* @param description
* description to add
*/
private void addDescription(RadioButton radioItem, String description) {
Element descElement = DOM.createSpan();
descElement.setInnerText(" " + description);
descElement.getStyle().setColor("#888");
radioItem.getElement().appendChild(descElement);
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class IncrementalFindReportStatusObserver method update.
/**
*
* Checks if {@code statusMessage} is incremental find message.
* In case if this is true than create or update simple UI to display
* message content, otherwise skip this message.
*
* @param statusMessage
* editor status message.
*/
@Override
public void update(StatusMessage statusMessage) {
String message = statusMessage.getMessage();
boolean isIncrementalFindMessage = message.startsWith("Incremental find:") | message.startsWith("Reverse Incremental find:");
if (!message.isEmpty() && !isIncrementalFindMessage) {
return;
}
Element editorElem = editorWidget.asWidget().getElement();
Element findDiv = createFindDiv(message);
setStyle(message, findDiv);
editorElem.appendChild(findDiv);
if (isNullOrEmpty(message) && findDiv != null) {
editorElem.removeChild(findDiv);
this.findDiv = null;
}
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class IncrementalFindReportStatusObserver method createFindDiv.
private Element createFindDiv(String message) {
if (findDiv == null) {
findDiv = Elements.createDivElement();
Text messageNode = Elements.createTextNode(message);
findDiv.appendChild(messageNode);
}
findDiv.getFirstChild().setTextContent(message);
return (Element) findDiv;
}
Aggregations