@Override public Element render(Node node, String domID, Tree.Joint joint, int depth) { Element element = super.render(node, domID, joint, depth); element.setAttribute("name", node.getName()); if (node instanceof ResourceNode) { element.setAttribute( "path", ((ResourceNode) node).getData().getLocation().toString()); } if (node instanceof HasAttributes && ((HasAttributes) node).getAttributes().containsKey(CUSTOM_BACKGROUND_FILL)) { element .getFirstChildElement() .getStyle() .setBackgroundColor( ((HasAttributes) node).getAttributes().get(CUSTOM_BACKGROUND_FILL).get(0)); } return element; } });
@Override public Element render(Node node, String domID, Tree.Joint joint, int depth) { Element element = super.render(node, domID, joint, depth); element.setAttribute("name", node.getName()); if (node instanceof ResourceNode) { element.setAttribute( "path", ((ResourceNode) node).getData().getLocation().toString()); element.setAttribute( "project", ((ResourceNode) node) .getData() .getRelatedProject() .get() .getLocation() .toString()); } if (node instanceof HasAttributes && ((HasAttributes) node).getAttributes().containsKey(CUSTOM_BACKGROUND_FILL)) { element .getFirstChildElement() .getStyle() .setBackgroundColor( ((HasAttributes) node).getAttributes().get(CUSTOM_BACKGROUND_FILL).get(0)); } return element; } });
&& ((HasAttributes) node).getAttributes().containsKey(CUSTOM_BACKGROUND_FILL)) { element .getFirstChildElement() .getStyle() .setBackgroundColor( ((HasAttributes) node).getAttributes().get(CUSTOM_BACKGROUND_FILL).get(0));