org.ow2.clif.analyze.lib.graph
Class ChartEngineImpl

java.lang.Object
  extended by org.ow2.clif.analyze.lib.graph.ChartEngineImpl
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, ChartControl

public class ChartEngineImpl
extends java.lang.Object
implements org.objectweb.fractal.api.control.BindingController, ChartControl

The Class ChartEngineImpl.


Field Summary
 
Fields inherited from interface org.ow2.clif.analyze.api.graph.ChartControl
AREA_RENDERER, BAR_RENDERER, CHART_CONTROL, DOT_RENDERER, LINE_RENDERER
 
Constructor Summary
ChartEngineImpl()
          Instantiates a new chart engine impl.
 
Method Summary
 void addYAxis(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel)
          Add an Y axis to the chart.
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 int createNewChart(java.lang.String type)
          Create a new chart of the type type.
 javax.swing.JPanel getChart(int chartId)
          Get a panel with a chart in.
 java.awt.image.BufferedImage getChartImage(int chartId, int width, int height)
          Get an image of the chart.
 java.awt.Color getColor(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel)
          Gets the color.
 ChartEngineImpl getInstance()
          Gets the single instance of ChartEngineImpl.
 int getLowerLimit(int chartId)
          Gets the lower limit.
 int getMaxNumberOfPoint(int chartId)
          Gets the max number of point.
 java.util.Map getRendererList()
          Gets the renderer list.
 int getUpperLimit(int chartId)
          Gets the upper limit.
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 void removeYAxis(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel)
          Remove a Y axis to the chart.
 void setChartTitle(int chartId, java.lang.String title)
          Define the chart's title.
 void setColor(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel, java.awt.Color color)
          Sets the color of a plot.
 void setDomainRange(int chartId, int lower, int upper)
          Sets the domain range.
 void setMaxNumberOfPoint(int chartId, int number)
          Sets the max number of point.
 void setRenderer(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel, java.lang.String rendererType)
          Sets the renderer.
 void setXAxis(int chartId, java.lang.String fieldName)
          Define the X axis for the chart.
 void setXAxisLabel(int chartId, java.lang.String label)
          Define the X axis' label.
 void setYAxisLabel(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel, java.lang.String label)
          Define a Y axis' label.
 void setYAxisMovingStatistics(int chartId, java.lang.String testName, java.lang.String bladeId, java.lang.String eventTypeLabel, java.lang.String fieldLabel, java.lang.String movingStatistic, int timeWindow, int step)
          Sets the Y axis moving statistics.
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartEngineImpl

public ChartEngineImpl()
Instantiates a new chart engine impl.

Method Detail

getInstance

public ChartEngineImpl getInstance()
Gets the single instance of ChartEngineImpl.

Returns:
single instance of ChartEngineImpl

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

addYAxis

public void addYAxis(int chartId,
                     java.lang.String testName,
                     java.lang.String bladeId,
                     java.lang.String eventTypeLabel,
                     java.lang.String fieldLabel)
Description copied from interface: ChartControl
Add an Y axis to the chart.

Specified by:
addYAxis in interface ChartControl
Parameters:
chartId - the chart id
testName - the name of the test
bladeId - the id of a blade
eventTypeLabel - the label of an event type
fieldLabel - the field label

createNewChart

public int createNewChart(java.lang.String type)
Description copied from interface: ChartControl
Create a new chart of the type type.

Specified by:
createNewChart in interface ChartControl
Parameters:
type - the type of chart
Returns:
the chart id

getChart

public javax.swing.JPanel getChart(int chartId)
Description copied from interface: ChartControl
Get a panel with a chart in.

Specified by:
getChart in interface ChartControl
Parameters:
chartId - the chart id
Returns:
a panel with the request chart in

removeYAxis

public void removeYAxis(int chartId,
                        java.lang.String testName,
                        java.lang.String bladeId,
                        java.lang.String eventTypeLabel,
                        java.lang.String fieldLabel)
Description copied from interface: ChartControl
Remove a Y axis to the chart.

Specified by:
removeYAxis in interface ChartControl
Parameters:
chartId - the chart id
testName - the name of the test
bladeId - the id of a blade
eventTypeLabel - the label of an event type
fieldLabel - the field label

setChartTitle

public void setChartTitle(int chartId,
                          java.lang.String title)
Description copied from interface: ChartControl
Define the chart's title.

Specified by:
setChartTitle in interface ChartControl
Parameters:
chartId - the chart id
title - the chart's title

setXAxis

public void setXAxis(int chartId,
                     java.lang.String fieldName)
Description copied from interface: ChartControl
Define the X axis for the chart.

Specified by:
setXAxis in interface ChartControl
Parameters:
chartId - the chart id
fieldName - the field name

setXAxisLabel

public void setXAxisLabel(int chartId,
                          java.lang.String label)
Description copied from interface: ChartControl
Define the X axis' label.

Specified by:
setXAxisLabel in interface ChartControl
Parameters:
chartId - the chart id
label - the label of the X axis

setYAxisLabel

public void setYAxisLabel(int chartId,
                          java.lang.String testName,
                          java.lang.String bladeId,
                          java.lang.String eventTypeLabel,
                          java.lang.String fieldLabel,
                          java.lang.String label)
Description copied from interface: ChartControl
Define a Y axis' label.

Specified by:
setYAxisLabel in interface ChartControl
Parameters:
chartId - the chart id
testName - the name of the test
bladeId - the id of a blade
eventTypeLabel - the label of an event type
fieldLabel - the field label
label - the label of the Y axis

getChartImage

public java.awt.image.BufferedImage getChartImage(int chartId,
                                                  int width,
                                                  int height)
Description copied from interface: ChartControl
Get an image of the chart.

Specified by:
getChartImage in interface ChartControl
Parameters:
chartId - the chart id
width - the width
height - the height
Returns:
an buffered image of the chart

getColor

public java.awt.Color getColor(int chartId,
                               java.lang.String testName,
                               java.lang.String bladeId,
                               java.lang.String eventTypeLabel,
                               java.lang.String fieldLabel)
Description copied from interface: ChartControl
Gets the color.

Specified by:
getColor in interface ChartControl
Parameters:
chartId - the chart id
testName - the test name
bladeId - the blade id
eventTypeLabel - the event type label
fieldLabel - the field label
Returns:
the color

setColor

public void setColor(int chartId,
                     java.lang.String testName,
                     java.lang.String bladeId,
                     java.lang.String eventTypeLabel,
                     java.lang.String fieldLabel,
                     java.awt.Color color)
Description copied from interface: ChartControl
Sets the color of a plot.

Specified by:
setColor in interface ChartControl
Parameters:
chartId - the chart id
testName - the test name
bladeId - the blade id
eventTypeLabel - the event type label
fieldLabel - the field label
color - the color

setRenderer

public void setRenderer(int chartId,
                        java.lang.String testName,
                        java.lang.String bladeId,
                        java.lang.String eventTypeLabel,
                        java.lang.String fieldLabel,
                        java.lang.String rendererType)
Description copied from interface: ChartControl
Sets the renderer.

Specified by:
setRenderer in interface ChartControl
Parameters:
chartId - the chart id
testName - the test name
bladeId - the blade id
eventTypeLabel - the event type label
fieldLabel - the field label
rendererType - the type renderer

getRendererList

public java.util.Map getRendererList()
Description copied from interface: ChartControl
Gets the renderer list.

Specified by:
getRendererList in interface ChartControl
Returns:
the list of renderer list

setYAxisMovingStatistics

public void setYAxisMovingStatistics(int chartId,
                                     java.lang.String testName,
                                     java.lang.String bladeId,
                                     java.lang.String eventTypeLabel,
                                     java.lang.String fieldLabel,
                                     java.lang.String movingStatistic,
                                     int timeWindow,
                                     int step)
Description copied from interface: ChartControl
Sets the Y axis moving statistics.

Specified by:
setYAxisMovingStatistics in interface ChartControl
Parameters:
chartId - the chart id
testName - the test name
bladeId - the blade id
eventTypeLabel - the event type label
fieldLabel - the field label
movingStatistic - the moving statistic
timeWindow - the time window
step - the step

setDomainRange

public void setDomainRange(int chartId,
                           int lower,
                           int upper)
Description copied from interface: ChartControl
Sets the domain range.

Specified by:
setDomainRange in interface ChartControl
Parameters:
chartId - the chart id
lower - the lower
upper - the upper

getLowerLimit

public int getLowerLimit(int chartId)
Description copied from interface: ChartControl
Gets the lower limit.

Specified by:
getLowerLimit in interface ChartControl
Parameters:
chartId - the chart id
Returns:
the lower limit

getMaxNumberOfPoint

public int getMaxNumberOfPoint(int chartId)
Description copied from interface: ChartControl
Gets the max number of point.

Specified by:
getMaxNumberOfPoint in interface ChartControl
Parameters:
chartId - the chart id
Returns:
the max number of point

getUpperLimit

public int getUpperLimit(int chartId)
Description copied from interface: ChartControl
Gets the upper limit.

Specified by:
getUpperLimit in interface ChartControl
Parameters:
chartId - the chart id
Returns:
the upper limit

setMaxNumberOfPoint

public void setMaxNumberOfPoint(int chartId,
                                int number)
Description copied from interface: ChartControl
Sets the max number of point.

Specified by:
setMaxNumberOfPoint in interface ChartControl
Parameters:
chartId - the chart id
number - the number