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;
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class ClipboardButtonBuilderImpl method build.
@Override
public Element build() {
Element button = null;
if (resourceWidget != null) {
Element buttonImage = svgImage != null ? svgImage.getElement() : new SVGImage(res.clipboard()).getElement();
button = buildCopyToClipboardButton(resourceWidget.getElement(), buttonImage, res.clipboardCss().clipboardButton(), mimeType, promptReadyToCopy, promptAfterCopy, promptCopyError, promptReadyToSelect);
append(button);
}
return button;
}
use of com.google.gwt.dom.client.Element 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.dom.client.Element in project che by eclipse.
the class OutputConsoleViewImpl method getText.
@Override
public String getText() {
String text = "";
NodeList<Node> nodes = consoleLines.getElement().getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.getItem(i);
Element element = node.cast();
text += element.getInnerText() + "\r\n";
}
return text;
}
use of com.google.gwt.dom.client.Element 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);
}
Aggregations