com.davisor.graphics.chart
Class DumpFactory

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartFactory
      extended bycom.davisor.graphics.chart.DumpFactory
All Implemented Interfaces:
com.davisor.core.Dupable, com.davisor.core.MIMETypes, com.davisor.core.Public

public class DumpFactory
extends ChartFactory

DumpFactory implements a dump chart that produces XML markup dump of chart data and chart attributes.

Since:
JDK 1.3
See Also:
createChart(com.davisor.graphics.chart.ChartFactory.ChartContext, com.davisor.graphics.chart.ChartFactory.ChartMetrics, com.davisor.graphics.chart.ChartAttributes, com.davisor.graphics.chart.Chart), ChartAttributes, ChartData

Nested Class Summary
 
Nested classes inherited from class com.davisor.graphics.chart.ChartFactory
ChartFactory.ChartContext, ChartFactory.ChartMetrics
 
Field Summary
 
Fields inherited from class com.davisor.graphics.chart.ChartFactory
ALL, BRIGHT, CHANNEL, COS, DARK, DOTSEQUENCE, DOTSTROKE, DOTSTROKEWIDTH, DUMPFACTORYNAME, ENCODERINFO, FONT, FRC, HAS_3D, I, LABEL, LABELFIELDNAMES, LABELFIELDS, MIME_DEFAULT, NONE, NORMAL, NULLSTROKE, PERCENT, PI2, SHAPE, SIN, STROKE, STROKEWIDTH, TIC, VALUE, X, Y, Z
 
Fields inherited from interface com.davisor.core.MIMETypes
FILETYPE_BMP, FILETYPE_CSS, FILETYPE_DOC, FILETYPE_ECMA, FILETYPE_GIF, FILETYPE_HTML, FILETYPE_HTML_CSS, FILETYPE_INDEX, FILETYPE_INDEX_DOC, FILETYPE_INDEX_HTML, FILETYPE_INDEX_HTML_CSS, FILETYPE_INDEX_PDF, FILETYPE_INDEX_PPT, FILETYPE_INDEX_SVG, FILETYPE_INDEX_XHTML, FILETYPE_INDEX_XLS, FILETYPE_INDEX_XMSE, FILETYPE_INDEX_XMSP, FILETYPE_INDEX_XMSW, FILETYPE_INDEX_XSLFO, FILETYPE_JPEG, FILETYPE_PDF, FILETYPE_PNG, FILETYPE_PNG_WBMP, FILETYPE_PPM, FILETYPE_PPT, FILETYPE_SVG, FILETYPE_TEXT, FILETYPE_WBMP, FILETYPE_XHTML, FILETYPE_XLS, FILETYPE_XML, FILETYPE_XMSE, FILETYPE_XMSP, FILETYPE_XMSW, FILETYPE_XSLFO, FILETYPE_XSLFO_CSS, MIME_BMP, MIME_CSS, MIME_DOC, MIME_ECMA, MIME_GIF, MIME_HTML, MIME_HTML_CSS, MIME_INDEX, MIME_INDEX_DOC, MIME_INDEX_HTML, MIME_INDEX_HTML_CSS, MIME_INDEX_PDF, MIME_INDEX_PPT, MIME_INDEX_SVG, MIME_INDEX_XHTML, MIME_INDEX_XLS, MIME_INDEX_XMSE, MIME_INDEX_XMSP, MIME_INDEX_XMSW, MIME_INDEX_XSLFO, MIME_JPEG, MIME_OTHER, MIME_PDF, MIME_PNG, MIME_PNG_WBMP, MIME_PPM, MIME_PPT, MIME_SVG, MIME_TEXT, MIME_WBMP, MIME_XHTML, MIME_XLS, MIME_XML, MIME_XMSE, MIME_XMSP, MIME_XMSW, MIME_XSLFO, MIME_XSLFO_CSS
 
Constructor Summary
DumpFactory()
          Creates a new table factory.
DumpFactory(DumpFactory factory)
          Copy constructor.
 
Method Summary
 Chart createChart(ChartFactory.ChartContext chartContext, ChartFactory.ChartMetrics chartMetrics, ChartAttributes attr, Chart chart)
          Writes Chart XML using information in ChartData and ChartAttributes.
 ChartFactory.ChartContext createContext(ChartData data, ChartAttributes attr)
          Creates and initializes a dump chart context.
 ChartFactory.ChartMetrics createMetrics(ChartFactory.ChartContext context, ChartAttributes attr)
          Resolves final chart image and image component sizes.
 com.davisor.core.Dupable dup()
          Duplicates this factory.
 java.lang.String getContentType()
          Gets the content type preferred by this factory.
 boolean mayHaveLegend()
          Determines whether a sensible legend exists or not.
 
Methods inherited from class com.davisor.graphics.chart.ChartFactory
annotate, combineProperties, createChannelType, createChannelType, createChart, createChart, createChart, createChart, createChart, createFormat, createPaintChannelType, createPaintChannelType, createShapeChannelType, createShapeChannelType, createSummary, drawLabel, getDefaultPaint, getFactory, getFactory, getGroup, getIsometricCoefficients, getLegendShape, getName, has3D, hasSVG, isClassAvailable, isMultiSeriesMode, main, registerFactory, resolveDataLimits, resolveDataLimits, rotateSize, shade, unregisterFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpFactory

public DumpFactory()
Creates a new table factory.


DumpFactory

public DumpFactory(DumpFactory factory)
Copy constructor.

Method Detail

createContext

public ChartFactory.ChartContext createContext(ChartData data,
                                               ChartAttributes attr)
                                        throws ChartException
Creates and initializes a dump chart context.

Specified by:
createContext in class ChartFactory
Parameters:
data - chart data
attr - chart attributes
Returns:
chart context, containing chart sizing information
Throws:
ChartException - if chart generation fails
See Also:
createMetrics(com.davisor.graphics.chart.ChartFactory.ChartContext, com.davisor.graphics.chart.ChartAttributes)

createMetrics

public ChartFactory.ChartMetrics createMetrics(ChartFactory.ChartContext context,
                                               ChartAttributes attr)
                                        throws ChartException
Resolves final chart image and image component sizes.

Specified by:
createMetrics in class ChartFactory
Parameters:
context - chart context
attr - chart attributes
Returns:
null always
Throws:
ChartException - if chart generation fails

createChart

public Chart createChart(ChartFactory.ChartContext chartContext,
                         ChartFactory.ChartMetrics chartMetrics,
                         ChartAttributes attr,
                         Chart chart)
                  throws ChartException
Writes Chart XML using information in ChartData and ChartAttributes.

When possible, a chart dump will containt original chart factory type instead of the dump factory type. In particular, if the chart attributes to be dumped are an instance of ChartXMLAttributes, those attributes will be dumped with ChartXMLAttributes.toString(boolean), instead of ChartObjectAttributes.toString().

Specified by:
createChart in class ChartFactory
Parameters:
chartContext - context information
chartMetrics - metrics information
attr - chart attributes
chart - chart to be drawn into (may be null)
Returns:
the given chart instance or a new one if none was given
Throws:
ChartException - if chart generation fails
See Also:
getContentType(), AbstractTableRenderer, TableRenderer

getContentType

public java.lang.String getContentType()
Gets the content type preferred by this factory.

Overrides:
getContentType in class ChartFactory
Returns:
"text/xml"

mayHaveLegend

public boolean mayHaveLegend()
Determines whether a sensible legend exists or not. In a DumpFactory, XML markup dump is produced and therefore there will be no legend.

Overrides:
mayHaveLegend in class ChartFactory

dup

public com.davisor.core.Dupable dup()
Duplicates this factory.



Copyright © 2001-2004 Davisor Oy. All Rights Reserved.