Search in sources :

Example 6 with DivElement

use of elemental.html.DivElement in project che by eclipse.

the class ImageResourceUtils method createImageElement.

/** Creates a div from the specified {@link com.google.gwt.resources.client.ImageResource}. */
public static DivElement createImageElement(ImageResource image) {
    DivElement elem = Elements.createDivElement();
    applyImageResource(elem, image);
    return elem;
}
Also used : DivElement(elemental.html.DivElement)

Example 7 with DivElement

use of elemental.html.DivElement 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 8 with DivElement

use of elemental.html.DivElement in project che by eclipse.

the class ProcessTreeRenderer method createMachineLabel.

private DivElement createMachineLabel(String machineCategory) {
    final DivElement machineLabel = Elements.createDivElement();
    if (LABELS.containsKey(machineCategory)) {
        machineLabel.setTextContent(LABELS.get(machineCategory));
        machineLabel.setClassName(resources.getCss().dockerMachineLabel());
        return machineLabel;
    }
    machineLabel.setTextContent(machineCategory.substring(0, 3));
    machineLabel.setClassName(resources.getCss().differentMachineLabel());
    return machineLabel;
}
Also used : DivElement(elemental.html.DivElement)

Example 9 with DivElement

use of elemental.html.DivElement 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

DivElement (elemental.html.DivElement)9 SpanElement (elemental.html.SpanElement)3 Element (elemental.dom.Element)2 TreeNodeElement (org.eclipse.che.ide.ui.tree.TreeNodeElement)2 SVGImage (org.vectomatic.dom.svg.ui.SVGImage)2 SVGResource (org.vectomatic.dom.svg.ui.SVGResource)2 Text (elemental.dom.Text)1 Event (elemental.events.Event)1 EventListener (elemental.events.EventListener)1 AnchorElement (elemental.html.AnchorElement)1 EditorOpenedEvent (org.eclipse.che.ide.api.editor.EditorOpenedEvent)1 EditorPartPresenter (org.eclipse.che.ide.api.editor.EditorPartPresenter)1 HasNotificationPanel (org.eclipse.che.ide.api.editor.texteditor.HasNotificationPanel)1 TextEditor (org.eclipse.che.ide.api.editor.texteditor.TextEditor)1 TextEditorPartView (org.eclipse.che.ide.api.editor.texteditor.TextEditorPartView)1 FileContentUpdateEvent (org.eclipse.che.ide.api.event.FileContentUpdateEvent)1 VirtualFile (org.eclipse.che.ide.api.resources.VirtualFile)1 JarFileNode (org.eclipse.che.ide.ext.java.client.tree.library.JarFileNode)1