|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.ChartFactory
com.davisor.graphics.chart.LayoutFactory
LayoutFactory implements a chart that can combine different charts into one chart. The used layout can be specified.
Sub charts do not know anything about each others. They may share the same data and attributes.
At first, this is used only to combine a legend chart with some other chart.
| Nested Class Summary | |
class |
LayoutFactory.LayoutContext
Stores context information for the drawn chart and legend. |
class |
LayoutFactory.LayoutMetrics
Stores chart and legend metrics. |
| Nested classes inherited from class com.davisor.graphics.chart.ChartFactory |
ChartFactory.ChartContext, ChartFactory.ChartMetrics |
| Field Summary | |
static java.lang.Number |
DEFAULT_OFFSET
Default offset in device coordinates. |
protected static java.lang.String |
DEFAULTLEGENDFACTORYNAME
Legend factory name ("legend"). |
protected static java.lang.String |
DUMPFACTORYNAME
Dump factory name ("dump"). |
| Fields inherited from class com.davisor.graphics.chart.ChartFactory |
ALL, BRIGHT, CHANNEL, COS, DARK, DOTSEQUENCE, DOTSTROKE, DOTSTROKEWIDTH, 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 | |
LayoutFactory()
Default constructor. |
|
LayoutFactory(LayoutFactory factory)
Copy constructor. |
|
| Method Summary | |
Chart |
createChart(ChartData data,
ChartAttributes attr,
Chart chart)
Overrides the ChartFactory implementation. |
Chart |
createChart(ChartFactory.ChartContext chartContext,
ChartFactory.ChartMetrics chartMetrics,
ChartAttributes attr,
Chart chart)
Creates a chart with an embedded legend chart. |
ChartFactory.ChartContext |
createContext(ChartData data,
ChartAttributes attr)
Create chart and legend contexts and store them inside LayoutFactory.LayoutContext. |
ChartFactory.ChartMetrics |
createMetrics(ChartFactory.ChartContext chartContext,
ChartAttributes attr)
Create metrics for the chart and the legend. |
com.davisor.core.Dupable |
dup()
Duplicates this factory. |
static boolean |
hasLegend(ChartFactory factory,
ChartAttributes attr)
Decides whether there will be legend or not basing on the given factory and attributes. |
| Methods inherited from class com.davisor.graphics.chart.ChartFactory |
annotate, combineProperties, createChannelType, createChannelType, createChart, createChart, createChart, createChart, createFormat, createPaintChannelType, createPaintChannelType, createShapeChannelType, createShapeChannelType, createSummary, drawLabel, getContentType, getDefaultPaint, getFactory, getFactory, getGroup, getIsometricCoefficients, getLegendShape, getName, has3D, hasSVG, isClassAvailable, isMultiSeriesMode, main, mayHaveLegend, 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 |
public static java.lang.Number DEFAULT_OFFSET
protected static final java.lang.String DEFAULTLEGENDFACTORYNAME
protected static final java.lang.String DUMPFACTORYNAME
| Constructor Detail |
public LayoutFactory()
public LayoutFactory(LayoutFactory factory)
| Method Detail |
public Chart createChart(ChartData data,
ChartAttributes attr,
Chart chart)
throws ChartException
Creates a chart containing other charts laid out according to the layout specification. A layoutfactory chart consists of one or more charts, all draw into a common coordinate system. Please see class description for more information.
createChart in class ChartFactorydata - chart dataattr - chart attributes (may be null)chart - a ready made chart to draw onto (may be null)
ChartException - if chart generation failsChartFactory.createChart(ChartData,ChartAttributes)
public ChartFactory.ChartContext createContext(ChartData data,
ChartAttributes attr)
throws ChartException
LayoutFactory.LayoutContext. Resolve also legend attributes.
createContext in class ChartFactorydata - chart dataattr - chart attributes
ChartException - if chart generation failsChartFactory.createMetrics(com.davisor.graphics.chart.ChartFactory.ChartContext, com.davisor.graphics.chart.ChartAttributes)
public ChartFactory.ChartMetrics createMetrics(ChartFactory.ChartContext chartContext,
ChartAttributes attr)
throws ChartException
createMetrics in class ChartFactorychartContext - a LayoutContext instanceattr - chart attributes
ChartException - if chart generation fails
public Chart createChart(ChartFactory.ChartContext chartContext,
ChartFactory.ChartMetrics chartMetrics,
ChartAttributes attr,
Chart chart)
throws ChartException
The chart object the chart is rendered into depends on given
chart parameter. If no chart object is given, a new
one is created with ChartFactory.createChart(ChartAttributes,float,float,boolean). If the given
chart is an ImageChart instance, the chart is rendered
into it. In any other case the chart is deemed incompatible, and
no chart is rendered.
createChart in class ChartFactorychartContext - context information (LayoutContext)chartMetrics - size information used in drawing (LayoutMetrics)attr - chart attributeschart - chart to render to (may be null)
ChartException - if chart generation fails
public static boolean hasLegend(ChartFactory factory,
ChartAttributes attr)
throws ChartException
factory - The final chart factory (may be null)attr - Chart attributes
ChartException - If resolvation cannot be done due to the missing
informationpublic com.davisor.core.Dupable dup()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||