com.davisor.graphics.chart
Class AxisRenderAttributes

java.lang.Object
  extended bycom.davisor.graphics.RenderAttributes
      extended bycom.davisor.graphics.chart.AxisRenderAttributes
All Implemented Interfaces:
com.davisor.core.Dupable, java.io.Serializable

public class AxisRenderAttributes
extends RenderAttributes

AxisRenderAttributes represents rendering attributes for chart axes. The attributes cover the following sets of rendering attributes:

Chart factories, most notably AxisFactory, will use those attributes it finds meaningfull, and ignores the rest.

Since:
JDK1.2
See Also:
BackRenderAttributes, ChartAttributes, PlotRenderAttributes, Serialized Form

Field Summary
static int BACK
          Index for the back attribute set (6).
static int DEFAULTS
          Index for the default attribute set (0).
static int GRID
          Index for the grid attribute set (2).
static int LABEL
          Index for the label attribute set (3).
static int LINE
          Index for the axis attribute set (1).
static int NROFSETS
          Number of axis render attribute sets (7).
static int TIC
          Index for the title attribute set (4).
static int TITLE
          Index for the title attribute set (5).
 
Fields inherited from class com.davisor.graphics.RenderAttributes
ANTIALIASINDEX, ANTIALIASWORDS, AUTO, CEILING, CENTER, DIAGONAL, DOWN, FLOOR, FRONT, GRAPHICS, HORIZONTAL, INSIDE, LEFT, LEFTWALL, M_alignment, M_color, M_composite, M_defaultIndex, M_defaults, M_font, M_paint, M_shape, M_size, M_stroke, NE, NONE, NW, OFF, ON, OUTSIDE, RIGHT, RIGHTWALL, SE, SW, TEXT, THROUGH, UNSET, UP, VERTICAL
 
Constructor Summary
AxisRenderAttributes()
          Default constructor.
AxisRenderAttributes(AxisRenderAttributes ra)
          Shallow copy constructor.
AxisRenderAttributes(AxisRenderAttributes ra, AxisRenderAttributes defaults)
          Shallow copy constructor, with explicity given default values.
AxisRenderAttributes(java.awt.Paint[] colors, java.awt.Paint[] paints, java.awt.Stroke[] strokes, java.awt.Shape[] shapes, java.awt.Font[] fonts, int[] aligments, java.awt.Composite[] composites, RenderAttributes defaults)
          Creates a render attributes set with given the initial attribute values.
AxisRenderAttributes(java.awt.Paint color, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Shape shape, java.awt.Font font, int aligment, java.awt.Composite composite, RenderAttributes defaults)
          Creates a render attributes set with the given initial default attribute values.
 
Method Summary
 com.davisor.core.Dupable dup()
          Duplicates this object.
 java.lang.String toString()
          Gets axis rendering attributes XML representation.
 
Methods inherited from class com.davisor.graphics.RenderAttributes
equals, exchangeOrientation, getAlignment, getAlignment, getAlignment, getColor, getColor, getColor, getComposite, getComposite, getComposite, getDefaultAlignment, getDefaultColor, getDefaultComposite, getDefaultComposite, getDefaultFont, getDefaultPaint, getDefaults, getDefaultShape, getDefaultStroke, getDefaultStrokeWidth, getDiagonal, getFont, getFont, getFont, getHorizontal, getPaint, getPaint, getPaint, getShape, getShape, getShape, getStroke, getStroke, getStroke, getStrokeWidth, getStrokeWidth, getVertical, init, isDown, isHorizontal, isLeft, isRight, isUp, isVertical, next, setAlignment, setAlignment, setAlignment, setAlignment, setAlignment, setColor, setColor, setColor, setComposite, setComposite, setComposite, setDefaults, setFont, setFont, setFont, setPaint, setPaint, setPaint, setShape, setShape, setShape, setStroke, setStroke, setStroke, size, toAlignment, toAlignment, toAntialiasMode, toAntialiasMode, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULTS

public static final int DEFAULTS
Index for the default attribute set (0).

See Also:
Constant Field Values

LINE

public static final int LINE
Index for the axis attribute set (1).

See Also:
Constant Field Values

GRID

public static final int GRID
Index for the grid attribute set (2).

See Also:
Constant Field Values

LABEL

public static final int LABEL
Index for the label attribute set (3).

See Also:
Constant Field Values

TIC

public static final int TIC
Index for the title attribute set (4).

See Also:
Constant Field Values

TITLE

public static final int TITLE
Index for the title attribute set (5).

See Also:
Constant Field Values

BACK

public static final int BACK
Index for the back attribute set (6).

See Also:
Constant Field Values

NROFSETS

public static final int NROFSETS
Number of axis render attribute sets (7).

See Also:
Constant Field Values
Constructor Detail

AxisRenderAttributes

public AxisRenderAttributes()
Default constructor.

See Also:
RenderAttributes.RenderAttributes(int)

AxisRenderAttributes

public AxisRenderAttributes(AxisRenderAttributes ra)
Shallow copy constructor.

Parameters:
ra - render attributes to be copied (may be null)
See Also:
RenderAttributes.RenderAttributes(RenderAttributes)

AxisRenderAttributes

public AxisRenderAttributes(AxisRenderAttributes ra,
                            AxisRenderAttributes defaults)
Shallow copy constructor, with explicity given default values.

Parameters:
ra - render attributes to be copied (may be null)
defaults - default render attibutes (may be null)
See Also:
RenderAttributes.RenderAttributes(RenderAttributes,RenderAttributes)

AxisRenderAttributes

public AxisRenderAttributes(java.awt.Paint color,
                            java.awt.Paint paint,
                            java.awt.Stroke stroke,
                            java.awt.Shape shape,
                            java.awt.Font font,
                            int aligment,
                            java.awt.Composite composite,
                            RenderAttributes defaults)
Creates a render attributes set with the given initial default attribute values. The values will be installed on slot zero, the default index is also set to zero and exceptions are disabled. The result is that the attribute set will behave as if it had an equal value initially set for each slot.

Parameters:
color - initial color attribute values (may be null)
paint - initial paint attribute values (may be null)
stroke - initial stroke attribute values (may be null)
shape - initial shape attribute values (may be null)
font - initial font attribute values (may be null)
aligment - initial aligment attribute values (may be null)
composite - initial composite attribute values (may be null)
defaults - default attribute values (may be null)
See Also:
RenderAttributes.RenderAttributes(int,RenderAttributes,int, Paint,Paint,Stroke,Shape,Font,int, Composite)

AxisRenderAttributes

public AxisRenderAttributes(java.awt.Paint[] colors,
                            java.awt.Paint[] paints,
                            java.awt.Stroke[] strokes,
                            java.awt.Shape[] shapes,
                            java.awt.Font[] fonts,
                            int[] aligments,
                            java.awt.Composite[] composites,
                            RenderAttributes defaults)
Creates a render attributes set with given the initial attribute values. A null value array will leave all attributes' values as null (or UNSET).

Parameters:
colors - initial color attribute values (may be null)
paints - initial paint attribute values (may be null)
strokes - initial stroke attribute values (may be null)
shapes - initial shape attribute values (may be null)
fonts - initial font attribute values (may be null)
aligments - initial aligment attribute values (may be null)
composites - initial composite attribute values (may be null)
defaults - default attribute values (may be null)
See Also:
RenderAttributes.RenderAttributes(int,RenderAttributes,int, Paint[],Paint[],Stroke[],Shape[], Font[],int[],Composite[])
Method Detail

dup

public com.davisor.core.Dupable dup()
Description copied from class: RenderAttributes
Duplicates this object.

Specified by:
dup in interface com.davisor.core.Dupable
Overrides:
dup in class RenderAttributes

toString

public java.lang.String toString()
Gets axis rendering attributes XML representation. Axis rendering attributes are always part of axis or axes, so their string representation is a attribute list suitable to be appended inside a XML tag.

Overrides:
toString in class RenderAttributes
See Also:
RenderAttributes.toString(int,String)


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