be.ac.ulg.montefiore.run.totem.chart.model.plotters
Class LoadChartPlotter

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.chart.model.plotters.LoadChartPlotter
All Implemented Interfaces:
ChartPlotter

public class LoadChartPlotter
extends java.lang.Object
implements ChartPlotter

This plotter creates bar charts using links loads. The x-axis represents the links and the y-axis represents the (absolute or relative) load.

This class has been designed to allow the creation of two different bar charts:

  1. Charts where the load of all links is displayed.
  2. Charts where only a statistic about the load of links is displayed.
The distinction of the two types of charts is made thanks to the allLinks parameter. If it is true, the first type of charts is created. Otherwise, the second type of charts is created.

There is also a distinction in the meaning of the series names. In the first case, they give the name of the algorithm used to compute loads. In the second case, they give the links IDs.

Finally, for the first type of plots, a legend will be displayed. This is not the case for the second type of plots.

Creation date: 13-f�vr.-2006

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Constructor Summary
LoadChartPlotter()
           
 
Method Summary
 java.lang.String getDefaultXAxisTitle()
          returns the default value for the X axis
 java.lang.String getDefaultYAxisTitle()
          returns the default value for the Y axis
 java.util.List<ParameterDescriptor> getParameters()
          Return a list of parameters that can be given to the plot method.
 org.jfree.chart.JFreeChart plot(ChartData data, java.lang.String title, java.lang.String xAxisTitle, java.lang.String yAxisTitle, java.util.HashMap<java.lang.String,java.lang.String> params)
          Creates and returns a bar chart using data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadChartPlotter

public LoadChartPlotter()
Method Detail

plot

public org.jfree.chart.JFreeChart plot(ChartData data,
                                       java.lang.String title,
                                       java.lang.String xAxisTitle,
                                       java.lang.String yAxisTitle,
                                       java.util.HashMap<java.lang.String,java.lang.String> params)
Creates and returns a bar chart using data.

The following parameters are accepted:

  1. allLinks (boolean, default is true): see the documentation above.
  2. asId (integer): the domain to consider. The default behavior is to use the default domain.

Specified by:
plot in interface ChartPlotter
Parameters:
data - Data to use to compute the chart
title - Title to display on the chart
params - Parameters of the chart to build (implementation dependant).
Returns:
the JFreeChart representation of the chart.

getParameters

public java.util.List<ParameterDescriptor> getParameters()
Description copied from interface: ChartPlotter
Return a list of parameters that can be given to the plot method.

Specified by:
getParameters in interface ChartPlotter
Returns:

getDefaultXAxisTitle

public java.lang.String getDefaultXAxisTitle()
Description copied from interface: ChartPlotter
returns the default value for the X axis

Specified by:
getDefaultXAxisTitle in interface ChartPlotter
Returns:

getDefaultYAxisTitle

public java.lang.String getDefaultYAxisTitle()
Description copied from interface: ChartPlotter
returns the default value for the Y axis

Specified by:
getDefaultYAxisTitle in interface ChartPlotter
Returns:


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.