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;
}
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;
}
Aggregations