Search in sources :

Example 6 with Element

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;
}
Also used : DivElement(elemental.html.DivElement) Element(com.google.gwt.dom.client.Element) Text(elemental.dom.Text)

Example 7 with Element

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;
}
Also used : Element(com.google.gwt.dom.client.Element) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Example 8 with Element

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);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Example 9 with Element

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;
}
Also used : Node(com.google.gwt.dom.client.Node) PreElement(com.google.gwt.dom.client.PreElement) Element(com.google.gwt.dom.client.Element)

Example 10 with Element

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);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Aggregations

Element (com.google.gwt.dom.client.Element)193 DivElement (com.google.gwt.dom.client.DivElement)14 Test (org.junit.Test)13 TableRowElement (com.google.gwt.dom.client.TableRowElement)11 SVGSVGElement (elemental.svg.SVGSVGElement)11 InputElement (com.google.gwt.dom.client.InputElement)9 Node (com.google.gwt.dom.client.Node)8 Image (com.google.gwt.user.client.ui.Image)8 PatchMethod (com.googlecode.gwt.test.patchers.PatchMethod)8 EventTarget (com.google.gwt.dom.client.EventTarget)7 LabelElement (com.google.gwt.dom.client.LabelElement)7 NativeEvent (com.google.gwt.dom.client.NativeEvent)7 JsArrayString (com.google.gwt.core.client.JsArrayString)6 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)6 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)6 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)6 ImageResource (com.google.gwt.resources.client.ImageResource)6 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)6 GwtTestTest (com.googlecode.gwt.test.GwtTestTest)6 Label (com.google.gwt.user.client.ui.Label)5