@Override protected void newImplementationNode(ImplementationNode node) { NodeId nodeId = node.getId(); GraphvizNode gnode = new GraphvizNode(nodeId); gnode.setStyle(NodeStyle.SOLID); gnode.setHeaderBackgroundColor("#000000"); gnode.setHeaderTextColor("#ffffff"); gnode.setTitle(nameFactory.getClassName(nodeId.getKey())); for (Member member : node.getMembers()) { gnode.addField(portIdFactory.getPortId(member), nameFactory.getMemberName(member)); } addNode(gnode); }
@Override protected void newInstanceNode(InstanceNode node) { NodeId nodeId = node.getId(); GraphvizNode gnode = new GraphvizNode(nodeId); gnode.setStyle(NodeStyle.SOLID); gnode.setHeaderBackgroundColor("#000000"); gnode.setHeaderTextColor("#ffffff"); gnode.setTitle(nameFactory.getClassName(nodeId.getKey())); gnode.addSubtitle(0, nameFactory.getSourceName(node.getSource())); gnode.setHeaderBackgroundColor("#aaaaaa"); gnode.setHeaderTextColor("#ffffff"); gnode.setTitle(nameFactory.getInstanceName(node.getInstance())); for (Member member : node.getMembers()) { gnode.addField(portIdFactory.getPortId(member), nameFactory.getMemberName(member)); } addNode(gnode); }
@Override protected void newInterfaceNode(InterfaceNode node) { // TODO(phopkins): Show the Module on the graph, which comes from the // class name when source is a StackTraceElement. NodeId nodeId = node.getId(); GraphvizNode gnode = new GraphvizNode(nodeId); gnode.setStyle(NodeStyle.DASHED); Key<?> key = nodeId.getKey(); gnode.setTitle(nameFactory.getClassName(key)); gnode.addSubtitle(0, nameFactory.getAnnotationName(key)); addNode(gnode); }
/** @since 4.0 */ public GraphvizNode(NodeId nodeId) { this.nodeId = nodeId; }
/** @since 4.0 */ public NodeId getNodeId() { return nodeId; }
public GraphvizEdge(NodeId tailNodeId, NodeId headNodeId) { this.tailNodeId = tailNodeId; this.headNodeId = headNodeId; }
/** @since 4.0 */ public NodeId getHeadNodeId() { return headNodeId; }
/** @since 4.0 */ public NodeId getTailNodeId() { return tailNodeId; }
public GraphvizNode(NodeId nodeId) { this.nodeId = nodeId; }
public NodeId getNodeId() { return nodeId; }
public NodeId getHeadNodeId() { return headNodeId; }
public NodeId getTailNodeId() { return tailNodeId; }