AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
aud.util.CommonGraphvizDecorator Class Referenceabstract

Interface for simple decorator with preset properties. More...

+ Inheritance diagram for aud.util.CommonGraphvizDecorator:
+ Collaboration diagram for aud.util.CommonGraphvizDecorator:

Public Member Functions

abstract void highlightNode (GraphvizDecorable object)
 Set highlighted node. More...
 
abstract void highlightEdge (GraphvizDecorable object)
 Set highlighted edge. More...
 
abstract void markNode (GraphvizDecorable object)
 
abstract void unmarkNode (GraphvizDecorable object)
 unmark node object
More...
 
abstract void unmarkAllNodes ()
 unmark all nodes More...
 
abstract void markEdge (GraphvizDecorable object)
 
abstract void unmarkEdge (GraphvizDecorable object)
 unmark edge object
More...
 
abstract void unmarkAllEdges ()
 unmark all edges More...
 
String getGraphLabel ()
 get label More...
 
void setGraphLabel (String text)
 set label More...
 
void clear ()
 Clear all decorations. More...
 
String getGraphDecoration (GraphvizDecorable object)
 get graph decoration (returns same for all nodes/edges) More...
 
String getAllNodesDecoration ()
 get standard decoration for all nodes (list head) More...
 
String getAllEdgesDecoration ()
 get standard decoration for all edges (list head) More...
 
String getGlobalStyle ()
 get global style (returns same for all nodes/edges) More...
 
- Public Member Functions inherited from aud.util.GraphvizDecorator
String getNodeDecoration (GraphvizDecorable object)
 get node decoration More...
 
String getEdgeDecoration (GraphvizDecorable object)
 get node decoration More...
 
String getGraphDecoration (GraphvizDecorable object)
 get graph decoration (returns same for all nodes/edges) More...
 
String getAllNodesDecoration ()
 get standard decoration for all nodes (list head) More...
 
String getAllEdgesDecoration ()
 get standard decoration for all edges (list head) More...
 
String getGlobalStyle ()
 get global style (returns same for all nodes/edges) More...
 
String getFullNodeDecoration (GraphvizDecorable object)
 concatenates getAllNodesDecoration and getNodeDecoration More...
 
String getFullEdgeDecoration (GraphvizDecorable object)
 concatenates getAllEdgesDecoration and getEdgeDecoration More...
 

Protected Attributes

String all_nodes_style = "shape=circle"
 
String all_edges_style = null
 
String global_style = null
 
String graph_style = "fontsize=24"
 
String graph_label = null
 
String hilit_node_style = "style=filled,fillcolor=yellow,penwidth=2"
 
String hilit_edge_style = "color=red,penwidth=2"
 
String marked_node_style = "style=filled,fillcolor=lightgray,penwidth=1.5"
 
String marked_edge_style = "color=blue,penwidth=1.5"
 

Detailed Description

Interface for simple decorator with preset properties.

Defines styles and allows for

  • marking sets of nodes/edges (e.g., markNode)

  • highlighting one particular node/edge (e.g., highlightNode)

See also
SimpleDecorator
GraphvizDecorable
Graphvizable

Definition at line 20 of file CommonGraphvizDecorator.java.

Member Function Documentation

◆ clear()

void aud.util.CommonGraphvizDecorator.clear ( )

Clear all decorations.

Calls unmarkAllNodes and unmarkAllEdges and unsets highlighting, unsets label.

Definition at line 67 of file CommonGraphvizDecorator.java.

67 {
70 highlightNode(null);
71 highlightEdge(null);
72 setGraphLabel(null);
73 }
abstract void highlightNode(GraphvizDecorable object)
Set highlighted node.
abstract void unmarkAllEdges()
unmark all edges
void setGraphLabel(String text)
set label
abstract void highlightEdge(GraphvizDecorable object)
Set highlighted edge.
abstract void unmarkAllNodes()
unmark all nodes

References aud.util.CommonGraphvizDecorator.highlightEdge(), aud.util.CommonGraphvizDecorator.highlightNode(), aud.util.CommonGraphvizDecorator.setGraphLabel(), aud.util.CommonGraphvizDecorator.unmarkAllEdges(), and aud.util.CommonGraphvizDecorator.unmarkAllNodes().

Referenced by aud.example.BinaryTreeTraversal.traverse(), and aud.example.expr.ExpressionTreeTraversal.traverse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllEdgesDecoration()

String aud.util.CommonGraphvizDecorator.getAllEdgesDecoration ( )

get standard decoration for all edges (list head)

Reimplemented from aud.util.GraphvizDecorator.

Definition at line 85 of file CommonGraphvizDecorator.java.

References aud.util.CommonGraphvizDecorator.all_edges_style.

◆ getAllNodesDecoration()

String aud.util.CommonGraphvizDecorator.getAllNodesDecoration ( )

get standard decoration for all nodes (list head)

Reimplemented from aud.util.GraphvizDecorator.

Definition at line 83 of file CommonGraphvizDecorator.java.

References aud.util.CommonGraphvizDecorator.all_nodes_style.

◆ getGlobalStyle()

String aud.util.CommonGraphvizDecorator.getGlobalStyle ( )

get global style (returns same for all nodes/edges)

Reimplemented from aud.util.GraphvizDecorator.

Definition at line 87 of file CommonGraphvizDecorator.java.

References aud.util.CommonGraphvizDecorator.global_style.

◆ getGraphDecoration()

String aud.util.CommonGraphvizDecorator.getGraphDecoration ( GraphvizDecorable  object)

get graph decoration (returns same for all nodes/edges)

Reimplemented from aud.util.GraphvizDecorator.

Definition at line 75 of file CommonGraphvizDecorator.java.

75 {
76 if (graph_label!=null)
77 return "label=\""+graph_label+"\""+
78 (graph_style!=null ? ","+graph_style :"");
79 else
80 return graph_style;
81 }

References aud.util.CommonGraphvizDecorator.graph_label, and aud.util.CommonGraphvizDecorator.graph_style.

◆ getGraphLabel()

String aud.util.CommonGraphvizDecorator.getGraphLabel ( )

get label

Definition at line 59 of file CommonGraphvizDecorator.java.

59{ return graph_label; }

References aud.util.CommonGraphvizDecorator.graph_label.

Referenced by aud.example.expr.ExpressionTreeTraversal.output(), and aud.example.BinaryTreeTraversal.output().

+ Here is the caller graph for this function:

◆ highlightEdge()

abstract void aud.util.CommonGraphvizDecorator.highlightEdge ( GraphvizDecorable  object)
abstract

Set highlighted edge.

See also
highlightNode

Reimplemented in aud.util.SimpleDecorator.

Referenced by aud.util.CommonGraphvizDecorator.clear().

+ Here is the caller graph for this function:

◆ highlightNode()

abstract void aud.util.CommonGraphvizDecorator.highlightNode ( GraphvizDecorable  object)
abstract

Set highlighted node.

There is exactly one or no such node.

Parameters
objectnode or null (no highlight)

Reimplemented in aud.util.SimpleDecorator.

Referenced by aud.util.CommonGraphvizDecorator.clear().

+ Here is the caller graph for this function:

◆ markEdge()

abstract void aud.util.CommonGraphvizDecorator.markEdge ( GraphvizDecorable  object)
abstract

Reimplemented in aud.util.SimpleDecorator.

◆ markNode()

abstract void aud.util.CommonGraphvizDecorator.markNode ( GraphvizDecorable  object)
abstract

Reimplemented in aud.util.SimpleDecorator.

◆ setGraphLabel()

void aud.util.CommonGraphvizDecorator.setGraphLabel ( String  text)

◆ unmarkAllEdges()

abstract void aud.util.CommonGraphvizDecorator.unmarkAllEdges ( )
abstract

unmark all edges

Reimplemented in aud.util.SimpleDecorator.

Referenced by aud.util.CommonGraphvizDecorator.clear().

+ Here is the caller graph for this function:

◆ unmarkAllNodes()

abstract void aud.util.CommonGraphvizDecorator.unmarkAllNodes ( )
abstract

unmark all nodes

Reimplemented in aud.util.SimpleDecorator.

Referenced by aud.util.CommonGraphvizDecorator.clear().

+ Here is the caller graph for this function:

◆ unmarkEdge()

abstract void aud.util.CommonGraphvizDecorator.unmarkEdge ( GraphvizDecorable  object)
abstract

unmark edge object

Reimplemented in aud.util.SimpleDecorator.

◆ unmarkNode()

abstract void aud.util.CommonGraphvizDecorator.unmarkNode ( GraphvizDecorable  object)
abstract

unmark node object

Reimplemented in aud.util.SimpleDecorator.

Member Data Documentation

◆ all_edges_style

String aud.util.CommonGraphvizDecorator.all_edges_style = null
protected

◆ all_nodes_style

String aud.util.CommonGraphvizDecorator.all_nodes_style = "shape=circle"
protected

◆ global_style

String aud.util.CommonGraphvizDecorator.global_style = null
protected

◆ graph_label

String aud.util.CommonGraphvizDecorator.graph_label = null
protected

◆ graph_style

String aud.util.CommonGraphvizDecorator.graph_style = "fontsize=24"
protected

◆ hilit_edge_style

String aud.util.CommonGraphvizDecorator.hilit_edge_style = "color=red,penwidth=2"
protected

◆ hilit_node_style

String aud.util.CommonGraphvizDecorator.hilit_node_style = "style=filled,fillcolor=yellow,penwidth=2"
protected

◆ marked_edge_style

String aud.util.CommonGraphvizDecorator.marked_edge_style = "color=blue,penwidth=1.5"
protected

◆ marked_node_style

String aud.util.CommonGraphvizDecorator.marked_node_style = "style=filled,fillcolor=lightgray,penwidth=1.5"
protected

The documentation for this class was generated from the following file: