public class ChartManager
extends java.lang.Object
InstrumentVisitor
which feeds the necessary information asked by the charts.InstrumentVisitor
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<java.lang.Integer> |
heights |
private java.util.HashMap<java.lang.Character,java.lang.Integer> |
nodeTypeCount |
Constructor and Description |
---|
ChartManager()
Initializes the manager, by creating null value for each node type.
|
Modifier and Type | Method and Description |
---|---|
void |
countType(char type)
Counts update for node types.
|
org.jfree.chart.JFreeChart |
getHeightEvolutionChart()
Generates the curve chart for evolution of tree height during the visit.
|
org.jfree.chart.JFreeChart |
getTypeCountBar()
Generates the node type bar chart.
|
org.jfree.chart.JFreeChart |
getTypeCountPie()
Generates the node type pie chart.
|
void |
registerHeightByStep(int height)
Adds step by step the evolution of the tree height.
|
private java.util.HashMap<java.lang.Character,java.lang.Integer> nodeTypeCount
private java.util.ArrayList<java.lang.Integer> heights
public ChartManager()
public void countType(char type)
type
- the node type to countpublic void registerHeightByStep(int height)
height
- current tree heightpublic org.jfree.chart.JFreeChart getTypeCountPie()
public org.jfree.chart.JFreeChart getTypeCountBar()
public org.jfree.chart.JFreeChart getHeightEvolutionChart()