Class FormatManager
java.lang.Object
de.saar.chorus.ubench.chartviewer.FormatManager
This is a class providing methods to mark Splits and Subgraphs
via a JDomGraph.
Further this class provides methods to get a HTML representation
of a Split oder a subgraph so as to color the parts of the String
according to the marking in the main window.
ChartViewer. It manages the colors involved
and does the marking itself in a - Author:
- Michaela Regneri
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetHTMLforMarkedSplit(Split<GraphBasedNonterminal> split, Set<String> roots) Generates a HTML string to represent a split.static StringgetHTMLforMarkedSubgraph(String subgraph) Generates a HTML string to represent a subgraph.static voidMark the whole graph with a given color.static voidmarkRootFragment(String root, JDomGraph graph, DomGraph dg) This colors the root fragment of a split (which always gets a special color).static voidmarkSubgraph(Set<String> roots, JDomGraph graph, int subgraphindex, DomGraph dg) Mark a subgraph of the given graph according to the index with the next mark-up color.static voidmarkSubgraph(Set<String> roots, JDomGraph graph, DomGraph dg) Mark a subgraph of the given graph with the default marking color.static voidrefreshGraphLayout(JDomGraph graph) This relayouts the graph so as to make the color changes visible.static voidshadeGraph(JDomGraph graph) Colors the graph in a light grey.static voidReset a whole graph's color to the default colors.static void
-
Constructor Details
-
FormatManager
public FormatManager()
-
-
Method Details
-
unmark
Reset a whole graph's color to the default colors.- Parameters:
graph- the graph
-
unmark
-
markSubgraph
Mark a subgraph of the given graph according to the index with the next mark-up color.- Parameters:
roots- the roots of the fragments to markgraph- the graphsubgraphindex- the index indicating which color index to use
-
markSubgraph
Mark a subgraph of the given graph with the default marking color.- Parameters:
roots-graph-
-
getHTMLforMarkedSubgraph
Generates a HTML string to represent a subgraph. This "colors" the html string according to the colors that would be used to mark the nodes in the "real" graph.- Parameters:
subgraph- the set of nodes to mark- Returns:
- a HTML representation of the colored nodes
-
getHTMLforMarkedSplit
Generates a HTML string to represent a split. This "colors" the HTML string according to the colors that would be used to mark the split in the "real" graph.- Parameters:
split-roots-- Returns:
-
markGraph
Mark the whole graph with a given color.- Parameters:
color-graph-
-
shadeGraph
Colors the graph in a light grey.- Parameters:
graph-
-
markRootFragment
This colors the root fragment of a split (which always gets a special color).- Parameters:
root- the root fragmentgraph- the parent graph
-
refreshGraphLayout
This relayouts the graph so as to make the color changes visible.- Parameters:
graph-
-