org.graphstream.algorithm.measure
Class ChartMeasure

java.lang.Object
  extended by org.graphstream.algorithm.measure.ChartMeasure
Direct Known Subclasses:
ChartConnectivityMeasure, ChartSeriesMeasure

public abstract class ChartMeasure
extends Object

This is the base for high level measures. These measures allow to compute statistical values and plotting.


Nested Class Summary
static class ChartMeasure.PlotException
          Exception that can be raised when trying to plot measures.
static class ChartMeasure.PlotOutputType
          Defines the support used for rendering : on screen or in a file.
static class ChartMeasure.PlotParameters
          Parameters defining how to plot measures.
static class ChartMeasure.PlotType
          Type of plot.s
 
Method Summary
abstract  org.jfree.chart.JFreeChart createChart(ChartMeasure.PlotParameters params)
          Create a new chart of this measure according to a set of parameters.
abstract  ChartMeasure.PlotParameters getDefaultPlotParameters()
          Create a default set of parameters to plot this measure.
static void outputPlot(ChartMeasure.PlotParameters params, ChartMeasure... measures)
          Utility function to call outputPlot(PlotParameters, JFreeChart...) with ChartMeasure objects.
static void outputPlot(ChartMeasure.PlotParameters params, org.jfree.chart.JFreeChart... charts)
          Output some charts according to a set of parameters.
 void plot()
          Create a new plot with default plot parameters.
abstract  void plot(ChartMeasure.PlotParameters params)
          Plot this measure using a set of parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

plot

public void plot()
          throws ChartMeasure.PlotException
Create a new plot with default plot parameters.

Throws:
ChartMeasure.PlotException
See Also:
getDefaultPlotParameters()

getDefaultPlotParameters

public abstract ChartMeasure.PlotParameters getDefaultPlotParameters()
Create a default set of parameters to plot this measure.

Returns:
a default PlotParameters adapted to this measure.

plot

public abstract void plot(ChartMeasure.PlotParameters params)
                   throws ChartMeasure.PlotException
Plot this measure using a set of parameters.

Parameters:
params - parameters that should be used to plot the measure
Throws:
ChartMeasure.PlotException

createChart

public abstract org.jfree.chart.JFreeChart createChart(ChartMeasure.PlotParameters params)
                                                throws ChartMeasure.PlotException
Create a new chart of this measure according to a set of parameters.

Parameters:
params - the set of parameters used to create the chart
Returns:
a new chart
Throws:
ChartMeasure.PlotException

outputPlot

public static void outputPlot(ChartMeasure.PlotParameters params,
                              ChartMeasure... measures)
                       throws ChartMeasure.PlotException
Utility function to call outputPlot(PlotParameters, JFreeChart...) with ChartMeasure objects.

Parameters:
params - set of parameters used to output the plot
measures - measures to plot
Throws:
ChartMeasure.PlotException
See Also:
outputPlot(PlotParameters, JFreeChart...)

outputPlot

public static void outputPlot(ChartMeasure.PlotParameters params,
                              org.jfree.chart.JFreeChart... charts)
                       throws ChartMeasure.PlotException
Output some charts according to a set of parameters. Actually, only one chart is supported. According to ChartMeasure.PlotParameters.outputType, plot is displayed on screen or saved in a file.

Parameters:
params - parameters used to plot
charts - charts to output
Throws:
ChartMeasure.PlotException


Copyright © 2012. All Rights Reserved.