Search in sources :

Example 41 with Element

use of elemental.dom.Element in project che by eclipse.

the class ProcessTreeRenderer method createTerminalElement.

private SpanElement createTerminalElement(ProcessTreeNode node) {
    SpanElement root = Elements.createSpanElement(resources.getCss().commandTreeNode());
    root.appendChild(createCloseElement(node));
    SVGResource icon = node.getTitleIcon();
    if (icon != null) {
        SpanElement iconElement = Elements.createSpanElement(resources.getCss().processIcon());
        root.appendChild(iconElement);
        DivElement divElement = Elements.createDivElement(resources.getCss().processIconPanel());
        iconElement.appendChild(divElement);
        divElement.appendChild((Node) new SVGImage(icon).getElement());
    }
    Element nameElement = Elements.createSpanElement();
    nameElement.setTextContent(node.getName());
    Tooltip.create(nameElement, BOTTOM, MIDDLE, node.getName());
    root.appendChild(nameElement);
    Element spanElement = Elements.createSpanElement();
    spanElement.setInnerHTML(" ");
    root.appendChild(spanElement);
    return root;
}
Also used : SpanElement(elemental.html.SpanElement) SVGResource(org.vectomatic.dom.svg.ui.SVGResource) DivElement(elemental.html.DivElement) DivElement(elemental.html.DivElement) TreeNodeElement(org.eclipse.che.ide.ui.tree.TreeNodeElement) Element(elemental.dom.Element) SpanElement(elemental.html.SpanElement) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Example 42 with Element

use of elemental.dom.Element in project che by eclipse.

the class ProcessTreeRenderer method createCommandElement.

private SpanElement createCommandElement(ProcessTreeNode node) {
    SpanElement root = Elements.createSpanElement(resources.getCss().commandTreeNode());
    root.setAttribute("running", "" + node.isRunning());
    root.appendChild(createCloseElement(node));
    root.appendChild(createStopProcessElement(node));
    SVGResource icon = node.getTitleIcon();
    if (icon != null) {
        SpanElement iconElement = Elements.createSpanElement(resources.getCss().processIcon());
        root.appendChild(iconElement);
        DivElement divElement = Elements.createDivElement(resources.getCss().processIconPanel());
        iconElement.appendChild(divElement);
        divElement.appendChild((Node) new SVGImage(icon).getElement());
        DivElement badgeElement = Elements.createDivElement(resources.getCss().processBadge());
        divElement.appendChild(badgeElement);
    }
    Element nameElement = Elements.createSpanElement();
    nameElement.setTextContent(node.getName());
    Tooltip.create(nameElement, BOTTOM, MIDDLE, node.getName());
    root.appendChild(nameElement);
    Element spanElement = Elements.createSpanElement();
    spanElement.setInnerHTML(" ");
    root.appendChild(spanElement);
    return root;
}
Also used : SpanElement(elemental.html.SpanElement) SVGResource(org.vectomatic.dom.svg.ui.SVGResource) DivElement(elemental.html.DivElement) DivElement(elemental.html.DivElement) TreeNodeElement(org.eclipse.che.ide.ui.tree.TreeNodeElement) Element(elemental.dom.Element) SpanElement(elemental.html.SpanElement) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Example 43 with Element

use of elemental.dom.Element in project che by eclipse.

the class ProblemAnnotation method initializeImage.

private void initializeImage() {
    fImageElement = Elements.createDivElement();
    fImageElement.setClassName(javaRes.css().markElement());
    final Element selectedImageElement = getSelectedImageElement();
    if (selectedImageElement != null) {
        fImageElement.appendChild(selectedImageElement.cloneNode(true));
    }
}
Also used : JsElement(elemental.js.dom.JsElement) Element(elemental.dom.Element)

Example 44 with Element

use of elemental.dom.Element in project che by eclipse.

the class NoImplementationWidget method createItem.

@Override
public Element createItem(final Type itemModel) {
    final Element element = Elements.createLiElement(popupResources.popupStyle().item());
    final Element iconElement = Elements.createDivElement(popupResources.popupStyle().icon());
    int flag = itemModel.getFlags();
    if (flag == -1) {
        element.setInnerText(getEmptyMessage());
        return element;
    }
    SVGImage svgImage = getSvgImage(flag);
    iconElement.appendChild((Node) svgImage.getElement());
    element.appendChild(iconElement);
    element.appendChild(createTitleOfElement(itemModel));
    final EventListener validateListener = new EventListener() {

        @Override
        public void handleEvent(final Event evt) {
            openImplementationPresenter.actionPerformed(itemModel);
            hide();
        }
    };
    element.addEventListener(Event.DBLCLICK, validateListener, false);
    element.addEventListener(CUSTOM_EVT_TYPE_VALIDATE, validateListener, false);
    return element;
}
Also used : Element(elemental.dom.Element) SpanElement(elemental.html.SpanElement) Event(elemental.events.Event) CustomEvent(elemental.events.CustomEvent) EventListener(elemental.events.EventListener) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Example 45 with Element

use of elemental.dom.Element in project che by eclipse.

the class BreakpointRendererImpl method setBreakpointActive.

@Override
public void setBreakpointActive(final int lineNumber, final boolean active) {
    if (hasGutter != null) {
        final Element mark = this.hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER);
        if (mark != null) {
            Element element = active ? activeBreakpointMark : inactiveBreakpointMark;
            this.hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, element);
        }
    }
}
Also used : Element(elemental.dom.Element)

Aggregations

Element (elemental.dom.Element)48 SpanElement (elemental.html.SpanElement)23 DivElement (elemental.html.DivElement)15 JsElement (elemental.js.dom.JsElement)11 Event (elemental.events.Event)8 EventListener (elemental.events.EventListener)8 Node (elemental.dom.Node)7 HTMLCollection (elemental.html.HTMLCollection)5 LIElement (elemental.html.LIElement)5 TableCellElement (elemental.html.TableCellElement)5 TableElement (elemental.html.TableElement)5 InputElement (elemental.html.InputElement)4 JsLIElement (elemental.js.html.JsLIElement)4 JsUListElement (elemental.js.html.JsUListElement)4 TreeNodeElement (org.eclipse.che.ide.ui.tree.TreeNodeElement)4 SVGImage (org.vectomatic.dom.svg.ui.SVGImage)4 Scheduler (com.google.gwt.core.client.Scheduler)3 CustomEvent (elemental.events.CustomEvent)3 AnchorElement (elemental.html.AnchorElement)3 BRElement (elemental.html.BRElement)3