org.pentaho.chart
Class ChartDefinitionImpl

java.lang.Object
  extended by org.pentaho.chart.ChartDefinitionImpl
All Implemented Interfaces:
ChartDefinition

public class ChartDefinitionImpl
extends Object
implements ChartDefinition

The implementation of the ChartDefinition interface. This class will hold the objects used to load the chart definition and the related data.

Author:
David Kincade

Constructor Summary
ChartDefinitionImpl(ChartData data, ChartDocument doc)
          Constructs a ChartDefinition with the specified data and the chart document
ChartDefinitionImpl(ChartData data, org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
          Constructs a ChartDefinition by loading the chart information from a resource manager using the specified key.
ChartDefinitionImpl(ChartDocument doc)
          Constructs a ChartDefinition with the specified chart document
ChartDefinitionImpl(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
           
 
Method Summary
 ChartDocument getChartDocument()
          Returns the chart document which was set or loaded from the resource manager
 org.pentaho.reporting.libraries.resourceloader.ResourceKey getChartResourceKey()
          Returns the resource key which is used to store the chart in the resource manager
 org.pentaho.reporting.libraries.resourceloader.ResourceManager getChartResourceManager()
          Returns the resource manager in which the chart document is stored
 ChartData getData()
          Returns the chart data
 void setData(ChartData data)
          Sets the chart data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartDefinitionImpl

public ChartDefinitionImpl(ChartData data,
                           ChartDocument doc)
                    throws IllegalArgumentException
Constructs a ChartDefinition with the specified data and the chart document

Parameters:
data - the data for the chart (null is acceptable)
doc - the chart document used in generating the chart
Throws:
IllegalArgumentException - indicates the chart document passed is null

ChartDefinitionImpl

public ChartDefinitionImpl(ChartDocument doc)
                    throws IllegalArgumentException
Constructs a ChartDefinition with the specified chart document

Parameters:
doc -
Throws:
IllegalArgumentException - indicates the chart document passed is null

ChartDefinitionImpl

public ChartDefinitionImpl(ChartData data,
                           org.pentaho.reporting.libraries.resourceloader.ResourceManager manager,
                           org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
                    throws IllegalArgumentException,
                           org.pentaho.reporting.libraries.resourceloader.ResourceException
Constructs a ChartDefinition by loading the chart information from a resource manager using the specified key.

Parameters:
data - the data for the chart (null is acceptable)
manager - the resource manager from which the chart definition resource should be retrieved (null is acceptable)
key - the key used to retrieve the chart definition resource from the resource manager
Throws:
IllegalArgumentException - indicates the resource key provided is null
org.pentaho.reporting.libraries.resourceloader.ResourceException

ChartDefinitionImpl

public ChartDefinitionImpl(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager,
                           org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
                    throws IllegalArgumentException,
                           org.pentaho.reporting.libraries.resourceloader.ResourceException
Parameters:
manager -
key -
Throws:
IllegalArgumentException
org.pentaho.reporting.libraries.resourceloader.ResourceException
Method Detail

setData

public void setData(ChartData data)
Sets the chart data

Specified by:
setData in interface ChartDefinition
Parameters:
data - the chart data

getData

public ChartData getData()
Returns the chart data

Specified by:
getData in interface ChartDefinition
Returns:
the chart data

getChartResourceKey

public org.pentaho.reporting.libraries.resourceloader.ResourceKey getChartResourceKey()
Returns the resource key which is used to store the chart in the resource manager

Specified by:
getChartResourceKey in interface ChartDefinition
Returns:
the resource key which is used to store the chart in the resource manager

getChartResourceManager

public org.pentaho.reporting.libraries.resourceloader.ResourceManager getChartResourceManager()
Returns the resource manager in which the chart document is stored

Specified by:
getChartResourceManager in interface ChartDefinition
Returns:
the resource manager in which the chart document is stored

getChartDocument

public ChartDocument getChartDocument()
Returns the chart document which was set or loaded from the resource manager

Specified by:
getChartDocument in interface ChartDefinition
Returns:
the chart document which was set or loaded from the resource manager