de.laures.cewolf.taglib
Class ChartImageDefinition

java.lang.Object
  extended by de.laures.cewolf.taglib.ChartImageDefinition
All Implemented Interfaces:
ChartHolder, ChartImage, java.io.Serializable

public class ChartImageDefinition
extends java.lang.Object
implements ChartImage, ChartHolder, java.io.Serializable

Serializable implementaton of a ChartImage.

Author:
glaures
See Also:
ChartImage, Serialized Form

Field Summary
 
Fields inherited from interface de.laures.cewolf.ChartImage
IMG_TYPE_CHART, IMG_TYPE_LEGEND
 
Constructor Summary
ChartImageDefinition(ChartHolder ch, int width, int height, int type, java.lang.String mimeType, int timeout)
          Constructor for ChartImage
 
Method Summary
 byte[] getBytes()
          Writes out a cached image to an outputstream.
 org.jfree.chart.JFreeChart getChart()
          Returns a chart.
 org.jfree.data.general.Dataset getDataset()
          Returns the dataset produced when using this definition.
 int getHeight()
          Returns the height.
 java.lang.String getMimeType()
          Returns the mimeType.
 org.jfree.chart.ChartRenderingInfo getRenderingInfo()
           
 int getSize()
          Returns the size of the image in bytes.
 java.util.Date getTimeoutTime()
           
 int getType()
          Returns the type of the chart image.
 int getWidth()
          Returns the width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartImageDefinition

public ChartImageDefinition(ChartHolder ch,
                            int width,
                            int height,
                            int type,
                            java.lang.String mimeType,
                            int timeout)
Constructor for ChartImage

Method Detail

getHeight

public int getHeight()
Returns the height.

Specified by:
getHeight in interface ChartImage
Returns:
int

getWidth

public int getWidth()
Returns the width.

Specified by:
getWidth in interface ChartImage
Returns:
int

getType

public int getType()
Description copied from interface: ChartImage
Returns the type of the chart image.

Specified by:
getType in interface ChartImage
Returns:
the type of the chart image
See Also:
ChartImage.IMG_TYPE_CHART, ChartImage.IMG_TYPE_LEGEND

getChart

public org.jfree.chart.JFreeChart getChart()
                                    throws DatasetProduceException,
                                           ChartValidationException,
                                           PostProcessingException
Description copied from interface: ChartHolder
Returns a chart.

Specified by:
getChart in interface ChartHolder
Returns:
the chart object for this definition
Throws:
DatasetProduceException - if there could be no data produced for the cahrt
PostProcessingException - if a post processor failed to process the chart
ChartValidationException

getDataset

public org.jfree.data.general.Dataset getDataset()
                                          throws DatasetProduceException
Description copied from interface: ChartHolder
Returns the dataset produced when using this definition.

Specified by:
getDataset in interface ChartHolder
Returns:
Object the dataset for this definition
Throws:
DatasetProduceException - if the dataset could not be produced

getMimeType

public java.lang.String getMimeType()
Returns the mimeType.

Specified by:
getMimeType in interface ChartImage
Returns:
String

getRenderingInfo

public org.jfree.chart.ChartRenderingInfo getRenderingInfo()
                                                    throws CewolfException
Throws:
CewolfException

getBytes

public byte[] getBytes()
                throws CewolfException
Description copied from interface: ChartImage
Writes out a cached image to an outputstream. This method only marks the object as accessed and therfore frees it for cache cleanup.

Specified by:
getBytes in interface ChartImage
Throws:
CewolfException

getSize

public int getSize()
            throws CewolfException
Description copied from interface: ChartImage
Returns the size of the image in bytes.

Specified by:
getSize in interface ChartImage
Returns:
size of the image
Throws:
CewolfException - if the size could not be determined
See Also:
ChartImage.getSize()

getTimeoutTime

public java.util.Date getTimeoutTime()
Specified by:
getTimeoutTime in interface ChartImage


cewolf tag library - web charts with JFreeChart