com.davisor.graphics.chart
Class AxisFactory.AxisContext

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartFactory.ChartContext
      extended bycom.davisor.graphics.chart.AxisFactory.AxisContext
Direct Known Subclasses:
ShapeFactory.ShapeContext
Enclosing class:
AxisFactory

public class AxisFactory.AxisContext
extends ChartFactory.ChartContext

AxisContext holds the state of one particular axis chart while it is being constructed. The context life cycle has two major phases:

The initial parameters that are available before axis chart image size has been resolved are:

Additional parameters that become available after axis chart image size has been resolved are:


Field Summary
 java.util.Map additionalValues
          Derived values to be used with altFormat, urlFormat, and valueFormat.
 int[] altChannels
          Annotation description text data channel indexes.
 TupleType altType
          Annotation description text formatter.
 ChartAttributes attr
          Chart attributes.
 int[] colorChannels
          Color data channel indexes.
 Type[] colorChannelTypes
          Color data channel types for each value channel.
 short index
          Context index among other contexts.
 boolean isometric
          Isometric mode indicator.
 java.awt.Font[] labelFont
          Axis label fonts [X,Y,Z,...].
protected  float[] labelOffsets
          Label offset size [X,Y,Z] (never negative).
 float[][] labelSizes
          Axis label sizes.
 EnumType labelType
          Label channel access type (may be null).
 int lastPlotColorChannel
          Last color channel that belongs to plot (not to any series).
 int lastPlotPaintChannel
          Last paint channel that belongs to plot (not to any series).
protected  float[] markerOffsets
          Marker offset size [X,Y,(Z)].
 float[][] markerSizes
          Axis marker sizes.
 int[] paintChannels
          Paint data channel indexes.
 Type[] paintChannelTypes
          Paint data channel types for each value channel.
 PlotRenderAttributes plot
          Chart plot attributes.
 java.awt.Paint plotLineColor
          Default plot area line color.
 java.awt.Paint plotLinePaint
          Default plot area line paint.
 java.awt.Stroke plotLineStroke
          Default plot area line stroke.
 java.awt.Paint plotPointColor
          Default plot area point color.
 java.awt.Paint plotPointPaint
          Default plot area point paint.
 java.awt.Stroke plotPointStroke
          Default plot area point stroke.
 java.awt.Paint plotValueColor
          Default plot area value color.
 java.awt.Font plotValueFont
          Default plot area value font.
 java.awt.Paint plotValuePaint
          Default plot area value paint.
 int[] positionChannels
          Category axis position value channel indexes.
 float[] scale
          Non-plot area scale factors [X,Y].
 ChartDataSummary summary
          Chart data summary.
 java.awt.Font[] titleFont
          Axis title fonts.
 float[][] titleSizes
          Axis title sizes.
 int[] urlChannels
          Annotation URL address data channel indexes.
 Type urlChannelType
          Annotation URL address channel type.
 TupleType urlType
          Annotation URL address formatter.
 int[] valueChannels
          Value data channel indexes.
 TupleType valueType
          Composite value formatter.
 
Fields inherited from class com.davisor.graphics.chart.ChartFactory.ChartContext
data
 
Constructor Summary
AxisFactory.AxisContext(ChartData data, ChartAttributes attr, PlotRenderAttributes plot, ChartDataSummary summary, java.awt.Font[] labelFont, java.awt.Font[] titleFont, Type[] colorChannelTypes, int lastPlotColorChannel, Type[] paintChannelTypes, int lastPlotPaintChannel, Type urlChannelType, EnumType labelType, int[] valueChannels, int[] colorChannels, int[] paintChannels, int[] urlChannels, int[] altChannels, int[] positionChannels, float[] labelOffsets, float[] markerOffsets, float[][] titleSizes, boolean isometric, short index)
          Creates a new axis context.
AxisFactory.AxisContext(ChartData data, ChartAttributes attr, PlotRenderAttributes plot, ChartDataSummary summary, java.awt.Font[] labelFont, java.awt.Font[] titleFont, Type colorChannelType, Type paintChannelType, Type urlChannelType, EnumType labelType, int[] valueChannels, int[] colorChannels, int[] paintChannels, int[] urlChannels, int[] altChannels, int[] positionChannels, float[] labelOffsets, float[] markerOffsets, float[][] titleSizes, boolean isometric, short index)
          Deprecated.  
 
Method Summary
 void set(java.util.Map additionalValues, TupleType valueType, TupleType urlType, TupleType altType, java.awt.Paint plotLineColor, java.awt.Paint plotLinePaint, java.awt.Stroke plotLineStroke, java.awt.Paint plotPointColor, java.awt.Paint plotPointPaint, java.awt.Stroke plotPointStroke, java.awt.Paint plotValueColor, java.awt.Font plotValueFont, java.awt.Paint plotValuePaint)
          Upgrades the context with information available only after final chart image size has been resolved.
 void setLabelSizes(float[][] labelSizes)
          Sets label sizes, but preservering at least current minimum X and Y -axis label margins, if any.
 void setMargins(float minXMargin, float minYMargin)
          Ensures minimum X and Y -axis label margin values.
 void setMarkerSizes(float[] markerOffsets)
          Sets marker offsets.
 void setMarkerSizes(float[][] markerSizes)
          Sets marker sizes.
 void setScale(float[] scale)
          Sets axis scaling factors.
 java.lang.String toString()
          Returns memeber variable information as String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

additionalValues

public java.util.Map additionalValues
Derived values to be used with altFormat, urlFormat, and valueFormat.


altChannels

public int[] altChannels
Annotation description text data channel indexes.


attr

public ChartAttributes attr
Chart attributes.


plot

public PlotRenderAttributes plot
Chart plot attributes.


colorChannelTypes

public Type[] colorChannelTypes
Color data channel types for each value channel.


colorChannels

public int[] colorChannels
Color data channel indexes.


index

public short index
Context index among other contexts.


isometric

public boolean isometric
Isometric mode indicator.


labelFont

public java.awt.Font[] labelFont
Axis label fonts [X,Y,Z,...].


labelType

public EnumType labelType
Label channel access type (may be null).


labelOffsets

protected float[] labelOffsets
Label offset size [X,Y,Z] (never negative).


labelSizes

public float[][] labelSizes
Axis label sizes. [X,Y,Z,...][WIDTH,HEIGHT,MARGIN]


lastPlotColorChannel

public int lastPlotColorChannel
Last color channel that belongs to plot (not to any series).


lastPlotPaintChannel

public int lastPlotPaintChannel
Last paint channel that belongs to plot (not to any series).


markerOffsets

protected float[] markerOffsets
Marker offset size [X,Y,(Z)].


markerSizes

public float[][] markerSizes
Axis marker sizes. [X,Y,(Z),...][WIDTH,HEIGHT,(MARGIN)].


paintChannelTypes

public Type[] paintChannelTypes
Paint data channel types for each value channel.


paintChannels

public int[] paintChannels
Paint data channel indexes.


positionChannels

public int[] positionChannels
Category axis position value channel indexes.


summary

public ChartDataSummary summary
Chart data summary.


titleFont

public java.awt.Font[] titleFont
Axis title fonts. [X,Y,Z,...].


titleSizes

public float[][] titleSizes
Axis title sizes. [X,Y,Z,...][WIDTH,HEIGHT,MARGIN].


urlChannelType

public Type urlChannelType
Annotation URL address channel type.


urlChannels

public int[] urlChannels
Annotation URL address data channel indexes.


valueChannels

public int[] valueChannels
Value data channel indexes.


altType

public TupleType altType
Annotation description text formatter.


plotLineColor

public java.awt.Paint plotLineColor
Default plot area line color.


plotLinePaint

public java.awt.Paint plotLinePaint
Default plot area line paint.


plotLineStroke

public java.awt.Stroke plotLineStroke
Default plot area line stroke.


plotPointColor

public java.awt.Paint plotPointColor
Default plot area point color.


plotPointPaint

public java.awt.Paint plotPointPaint
Default plot area point paint.


plotPointStroke

public java.awt.Stroke plotPointStroke
Default plot area point stroke.


scale

public float[] scale
Non-plot area scale factors [X,Y].


urlType

public TupleType urlType
Annotation URL address formatter.


valueType

public TupleType valueType
Composite value formatter.


plotValueColor

public java.awt.Paint plotValueColor
Default plot area value color.


plotValueFont

public java.awt.Font plotValueFont
Default plot area value font.


plotValuePaint

public java.awt.Paint plotValuePaint
Default plot area value paint.

Constructor Detail

AxisFactory.AxisContext

public AxisFactory.AxisContext(ChartData data,
                               ChartAttributes attr,
                               PlotRenderAttributes plot,
                               ChartDataSummary summary,
                               java.awt.Font[] labelFont,
                               java.awt.Font[] titleFont,
                               Type colorChannelType,
                               Type paintChannelType,
                               Type urlChannelType,
                               EnumType labelType,
                               int[] valueChannels,
                               int[] colorChannels,
                               int[] paintChannels,
                               int[] urlChannels,
                               int[] altChannels,
                               int[] positionChannels,
                               float[] labelOffsets,
                               float[] markerOffsets,
                               float[][] titleSizes,
                               boolean isometric,
                               short index)
Deprecated.  

Creates a new axis context. The context will initially contains all information neccessary to resolve final chart image size. After that, the context may be upgraded with additional information only available after the final chart image size and partition has been computed.

See Also:
AxisFactory.AxisContext(ChartData,ChartAttributes,PlotRenderAttributes, ChartDataSummary,Font[],Font[],Type[],int,Type[],int,Type,EnumType, int[],int[],int[],int[],int[],int[],float[],float[],float[][], boolean,short)

AxisFactory.AxisContext

public AxisFactory.AxisContext(ChartData data,
                               ChartAttributes attr,
                               PlotRenderAttributes plot,
                               ChartDataSummary summary,
                               java.awt.Font[] labelFont,
                               java.awt.Font[] titleFont,
                               Type[] colorChannelTypes,
                               int lastPlotColorChannel,
                               Type[] paintChannelTypes,
                               int lastPlotPaintChannel,
                               Type urlChannelType,
                               EnumType labelType,
                               int[] valueChannels,
                               int[] colorChannels,
                               int[] paintChannels,
                               int[] urlChannels,
                               int[] altChannels,
                               int[] positionChannels,
                               float[] labelOffsets,
                               float[] markerOffsets,
                               float[][] titleSizes,
                               boolean isometric,
                               short index)
Creates a new axis context. The context will initially contains all information neccessary to resolve final chart image size. After that, the context may be upgraded with additional information only available after the final chart image size and partition has been computed.

Parameters:
data - chart data
attr - chart attributes
plot - local plot area attributes
summary - chart data summary
labelFont - axis label fonts [X,Y,Z,...]
titleFont - axis title fonts [X,Y,Z,...]
colorChannelTypes - color data channel types
lastPlotColorChannel - last color channel for plot
paintChannelTypes - paint data channel types
lastPlotPaintChannel - last paint channel for plot
urlChannelType - annotation URL address data channel type
labelType - label channel access type (may be null)
valueChannels - value data channel indexes
colorChannels - color data channel indexes
paintChannels - paint data channel indexes
urlChannels - annotation URL address data channel indexes
altChannels - annotation description text data channel indexes
labelOffsets - axis label offsets ([x,y,z])
titleSizes - axis title sizes ([x,y][w,h])
isometric - isometric mode indicator
index - context index among other contexts
Method Detail

toString

public java.lang.String toString()
Returns memeber variable information as String.


set

public void set(java.util.Map additionalValues,
                TupleType valueType,
                TupleType urlType,
                TupleType altType,
                java.awt.Paint plotLineColor,
                java.awt.Paint plotLinePaint,
                java.awt.Stroke plotLineStroke,
                java.awt.Paint plotPointColor,
                java.awt.Paint plotPointPaint,
                java.awt.Stroke plotPointStroke,
                java.awt.Paint plotValueColor,
                java.awt.Font plotValueFont,
                java.awt.Paint plotValuePaint)
Upgrades the context with information available only after final chart image size has been resolved.

Parameters:
valueType - composite value formatter
urlType - annotation URL address formatter
altType - annotation description text formatter
plotLineColor - default plot area line color
plotLinePaint - default plot area line paint
plotLineStroke - default plot area line stroke
plotPointColor - default plot area point color
plotPointPaint - default plot area point paint
plotPointStroke - default plot area point stroke
plotValueColor - default plot area value color
plotValueFont - default plot area value font
plotValuePaint - default plot area value paint

setLabelSizes

public void setLabelSizes(float[][] labelSizes)
Sets label sizes, but preservering at least current minimum X and Y -axis label margins, if any.

See Also:
setMargins(float,float), AxisFactory.labelAxis(com.davisor.graphics.chart.ChartAxis, java.awt.Graphics2D, float, float, float, float, float, float, float, boolean, boolean, boolean, boolean, boolean)

setMarkerSizes

public void setMarkerSizes(float[][] markerSizes)
Sets marker sizes.

See Also:
setLabelSizes(float[][]), setMarkerSizes(float[][]), AxisFactory.labelMarkers(com.davisor.graphics.chart.ChartAxis, java.awt.Graphics2D, com.davisor.graphics.chart.AxisFactory.AxisMetrics, float, float, float, float, float, float, float, float, float, boolean, boolean, boolean, boolean)

setMarkerSizes

public void setMarkerSizes(float[] markerOffsets)
Sets marker offsets.

See Also:
setMarkerSizes(float[][]), AxisFactory.labelMarkers(com.davisor.graphics.chart.ChartAxis, java.awt.Graphics2D, com.davisor.graphics.chart.AxisFactory.AxisMetrics, float, float, float, float, float, float, float, float, float, boolean, boolean, boolean, boolean)

setMargins

public void setMargins(float minXMargin,
                       float minYMargin)
Ensures minimum X and Y -axis label margin values.

See Also:
setLabelSizes(float[][])

setScale

public void setScale(float[] scale)
Sets axis scaling factors.

Parameters:
scale - non-plot area scale factors [X,Y]


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