Search in sources :

Example 11 with SVGResource

use of org.vectomatic.dom.svg.ui.SVGResource in project che by eclipse.

the class MachinePanelPresenterTest method titleImageShouldBeReturned.

@Test
public void titleImageShouldBeReturned() {
    SVGResource resource = presenter.getTitleImage();
    assertThat(resource, nullValue(SVGResource.class));
}
Also used : SVGResource(org.vectomatic.dom.svg.ui.SVGResource) Test(org.junit.Test)

Example 12 with SVGResource

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

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

SVGResource (org.vectomatic.dom.svg.ui.SVGResource)13 SVGImage (org.vectomatic.dom.svg.ui.SVGImage)4 Element (elemental.dom.Element)2 DivElement (elemental.html.DivElement)2 SpanElement (elemental.html.SpanElement)2 TreeNodeElement (org.eclipse.che.ide.ui.tree.TreeNodeElement)2 StatusNotification (org.eclipse.che.ide.api.notification.StatusNotification)1 Container (org.eclipse.che.ide.api.resources.Container)1 Marker (org.eclipse.che.ide.api.resources.marker.Marker)1 PresentableTextMarker (org.eclipse.che.ide.api.resources.marker.PresentableTextMarker)1 CutResourceMarker (org.eclipse.che.ide.api.resources.modification.CutResourceMarker)1 NodeIconProvider (org.eclipse.che.ide.project.node.icon.NodeIconProvider)1 Test (org.junit.Test)1