Search in sources :

Example 21 with Element

use of com.google.gwt.dom.client.Element in project che by eclipse.

the class TreeView method getDescendantsContainer.

public Element getDescendantsContainer(NodeDescriptor node) {
    if (node.getDescendantsContainerElement() == null) {
        Element element = getRootContainer(node).getChildNodes().getItem(1).cast();
        node.setDescendantsContainerElement(element);
    }
    return node.getDescendantsContainerElement();
}
Also used : SVGSVGElement(elemental.svg.SVGSVGElement) Element(com.google.gwt.dom.client.Element)

Example 22 with Element

use of com.google.gwt.dom.client.Element in project che by eclipse.

the class TreeView method onJointChange.

public void onJointChange(NodeDescriptor node, Tree.Joint joint) {
    Element currJointEl = getJointContainer(node);
    if (currJointEl == null) {
        return;
    }
    Element jointContainer = tree.getPresentationRenderer().getJointContainer(joint);
    getNodeContainer(node).insertFirst(jointContainer);
    currJointEl.removeFromParent();
    node.setJointContainerElement(jointContainer);
}
Also used : SVGSVGElement(elemental.svg.SVGSVGElement) Element(com.google.gwt.dom.client.Element)

Example 23 with Element

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);
}
Also used : 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)

Example 24 with Element

use of com.google.gwt.dom.client.Element in project che by eclipse.

the class ParametersHintsViewImpl method show.

@Override
public void show(List<MethodParameters> parametersList, int x, int y) {
    parametersPanel.clear();
    for (MethodParameters parameters : parametersList) {
        FlowPanel widget = panelsProvider.get();
        String parametersLine = parameters.getParameters();
        if (parametersLine.isEmpty()) {
            parametersLine = "<no parameters>";
        }
        String result = parametersLine.replace("<", "&lt").replace(">", "&gt");
        Element element = widget.getElement();
        element.setInnerHTML(result);
        element.getStyle().setColor("yellow");
        parametersPanel.add(widget);
    }
    setPopupPosition(x, y);
    show();
}
Also used : Element(com.google.gwt.dom.client.Element) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) MethodParameters(org.eclipse.che.ide.ext.java.shared.dto.model.MethodParameters)

Example 25 with Element

use of com.google.gwt.dom.client.Element in project actor-platform by actorapp.

the class JsFacade method handleLinkClick.

@UsedByApp
public void handleLinkClick(Event event) {
    Element target = Element.as(event.getEventTarget());
    String href = target.getAttribute("href");
    if (href.startsWith("send:")) {
        String msg = href.substring("send:".length());
        msg = URL.decode(msg);
        if (lastVisiblePeer != null) {
            messenger.sendMessage(lastVisiblePeer, msg);
            event.preventDefault();
        }
    } else {
        if (JsElectronApp.isElectron()) {
            JsElectronApp.openUrlExternal(href);
            event.preventDefault();
        }
    }
}
Also used : Element(com.google.gwt.dom.client.Element) UsedByApp(im.actor.core.js.annotations.UsedByApp)

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