com.davisor.graphics.chart
Class PaintLegendFactory

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

public class PaintLegendFactory
extends ScaleLegendFactory

PaintLegendFactory implements a legend factory which describes the paint scales used in chart.


Nested Class Summary
 
Nested classes inherited from class com.davisor.graphics.chart.ScaleLegendFactory
ScaleLegendFactory.ScaleLegendContext, ScaleLegendFactory.ScaleLegendEntry, ScaleLegendFactory.ScaleLegendMetrics
 
Nested classes inherited from class com.davisor.graphics.chart.ChartFactory
ChartFactory.ChartContext, ChartFactory.ChartMetrics
 
Field Summary
static int DEFAULT_HORIZONTAL_GAP
          Default horizontal gap (20).
static int DEFAULT_VERTICAL_GAP
          Default vertical gap (0).
 
Fields inherited from class com.davisor.graphics.chart.ScaleLegendFactory
DEFAULT_BORDER_PADDING, DEFAULT_HORIZONTAL_LABEL_GAP
 
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
PaintLegendFactory()
          Default constructor.
PaintLegendFactory(PaintLegendFactory factory)
          Copy constructor.
 
Method Summary
 Chart createChart(ChartFactory.ChartContext chartContext, ChartFactory.ChartMetrics chartMetrics, ChartAttributes attr, Chart chart)
          Creates and draws the paint legend chart.
 ChartFactory.ChartContext createContext(ChartData data, ChartAttributes attr)
          Resolve rendering attributes.
 com.davisor.core.Dupable dup()
          Duplicates this factory.
 
Methods inherited from class com.davisor.graphics.chart.ScaleLegendFactory
createMetrics, drawHorizontalEntry, drawVerticalEntry
 
Methods inherited from class com.davisor.graphics.chart.LegendFactory
getLabelBackgroundPaint, mayHaveLegend
 
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, getContentType, 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
 

Field Detail

DEFAULT_HORIZONTAL_GAP

public static final int DEFAULT_HORIZONTAL_GAP
Default horizontal gap (20).

See Also:
Constant Field Values

DEFAULT_VERTICAL_GAP

public static final int DEFAULT_VERTICAL_GAP
Default vertical gap (0).

See Also:
Constant Field Values
Constructor Detail

PaintLegendFactory

public PaintLegendFactory()
Default constructor.


PaintLegendFactory

public PaintLegendFactory(PaintLegendFactory factory)
Copy constructor.

Method Detail

createContext

public ChartFactory.ChartContext createContext(ChartData data,
                                               ChartAttributes attr)
                                        throws ChartException
Resolve rendering attributes. Create context. May return null.

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:
ChartFactory.createMetrics(com.davisor.graphics.chart.ChartFactory.ChartContext, com.davisor.graphics.chart.ChartAttributes)

createChart

public Chart createChart(ChartFactory.ChartContext chartContext,
                         ChartFactory.ChartMetrics chartMetrics,
                         ChartAttributes attr,
                         Chart chart)
                  throws ChartException
Creates and draws the paint legend chart.

Specified by:
createChart in class ChartFactory
Parameters:
chartContext - pre-calculated context information (ScaleLegendContext)
chartMetrics - pre-calculated size information used in drawing (ScaleLegendMetrics)
attr - chart attributes
chart - previously created chart to be drawn onto (may be null)
Returns:
the given chart instance or a new one if none was given
Throws:
ChartException - if chart generation fails

dup

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



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