AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
GraphvizDecorator.java
Go to the documentation of this file.
1package aud.util;
2
5public class GraphvizDecorator {
7 public String getNodeDecoration(GraphvizDecorable object) {
8 return null;
9 }
11 public String getEdgeDecoration(GraphvizDecorable object) {
12 return null;
13 }
15 public String getGraphDecoration(GraphvizDecorable object) {
16 return null;
17 }
19 public String getAllNodesDecoration() { return "shape=circle"; }
21 public String getAllEdgesDecoration() { return null; }
23 public String getGlobalStyle() { return null; }
24
27 String head=getAllNodesDecoration();
28 String text=head!=null ? head : "";
29 String tail=getNodeDecoration(object);
30 return tail!=null ? text+","+tail : text;
31 }
34 String head=getAllEdgesDecoration();
35 String text=head!=null ? head+"," : "";
36 String tail=getEdgeDecoration(object);
37 return tail!=null ? text+tail : text;
38 }
39}
Decorator for items of Graphvizable objects.
String getFullNodeDecoration(GraphvizDecorable object)
concatenates getAllNodesDecoration and getNodeDecoration
String getAllNodesDecoration()
get standard decoration for all nodes (list head)
String getNodeDecoration(GraphvizDecorable object)
get node decoration
String getFullEdgeDecoration(GraphvizDecorable object)
concatenates getAllEdgesDecoration and getEdgeDecoration
String getGlobalStyle()
get global style (returns same for all nodes/edges)
String getAllEdgesDecoration()
get standard decoration for all edges (list head)
String getEdgeDecoration(GraphvizDecorable object)
get node decoration
String getGraphDecoration(GraphvizDecorable object)
get graph decoration (returns same for all nodes/edges)
Interface for decorating items of Graphvizable objects.