Search in sources :

Example 21 with SVGImage

use of org.vectomatic.dom.svg.ui.SVGImage 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 22 with SVGImage

use of org.vectomatic.dom.svg.ui.SVGImage 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)

Aggregations

SVGImage (org.vectomatic.dom.svg.ui.SVGImage)22 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)6 SpanElement (elemental.html.SpanElement)6 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)4 Element (elemental.dom.Element)4 SVGResource (org.vectomatic.dom.svg.ui.SVGResource)4 SpanElement (com.google.gwt.dom.client.SpanElement)3 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)3 Image (com.google.gwt.user.client.ui.Image)3 Event (elemental.events.Event)3 EventListener (elemental.events.EventListener)3 DivElement (elemental.html.DivElement)3 Icon (org.eclipse.che.ide.api.icon.Icon)3 TreeNodeElement (org.eclipse.che.ide.ui.tree.TreeNodeElement)3 BlurEvent (com.google.gwt.event.dom.client.BlurEvent)2 DoubleClickEvent (com.google.gwt.event.dom.client.DoubleClickEvent)2 DoubleClickHandler (com.google.gwt.event.dom.client.DoubleClickHandler)2 KeyDownEvent (com.google.gwt.event.dom.client.KeyDownEvent)2 KeyUpEvent (com.google.gwt.event.dom.client.KeyUpEvent)2 Event (com.google.gwt.user.client.Event)2