com.davisor.graphics.chart
Class LineRenderAttributes

java.lang.Object
  extended bycom.davisor.graphics.RenderAttributes
      extended bycom.davisor.graphics.chart.LineRenderAttributes
All Implemented Interfaces:
com.davisor.core.Dupable, java.io.Serializable
Direct Known Subclasses:
DataRenderAttributes

public class LineRenderAttributes
extends RenderAttributes

LineRenderAttributes represents attributes for chart lines. Line attributes are inherited from RenderAttributes super-class, and they control the following line rendering aspects:

The attributes cover three sets of rendering attributes, one for default point attributes, one for default line attributes, and one for value attributes. The default attribute values will be used whenever a corresponding rendering attribute is otherwise unspecified, as described in attribute reference document.

Since:
JDK1.4
See Also:
AxisRenderAttributes, BackRenderAttributes, ChartAttributes, Serialized Form

Field Summary
static int BACK
          Index for back attribute set (4).
static int DEFAULTS
          Index for default attribute set (0).
static int LINE
          Index for line attribute set (2).
static int NROFSETS
          Number of line render attribute sets (5).
static int POINT
          Index for point attribute set (1).
static int VALUE
          Index for value attribute set (3).
 
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
LineRenderAttributes()
          Default constructor.
LineRenderAttributes(LineRenderAttributes lra)
          Shallow copy constructor.
LineRenderAttributes(LineRenderAttributes lra, LineRenderAttributes defaults)
          Shallow copy constructor, with explicitly given default values.
LineRenderAttributes(java.awt.Paint[] colors, java.awt.Paint[] paints, java.awt.Stroke[] strokes, java.awt.Shape[] shapes, java.awt.Font[] fonts, int[] alignments, java.awt.Composite[] composites, RenderAttributes defaults)
          Creates a render attributes set with the given initial attribute values.
LineRenderAttributes(java.awt.Paint color, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Shape shape, java.awt.Font font, int alignment, 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.
protected  void toString(java.lang.StringBuffer xml)
          Generate XML attributes names.
 
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 default attribute set (0).

See Also:
Constant Field Values

POINT

public static final int POINT
Index for point attribute set (1).

See Also:
Constant Field Values

LINE

public static final int LINE
Index for line attribute set (2).

See Also:
Constant Field Values

VALUE

public static final int VALUE
Index for value attribute set (3).

See Also:
Constant Field Values

BACK

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

See Also:
Constant Field Values

NROFSETS

public static final int NROFSETS
Number of line render attribute sets (5).

See Also:
Constant Field Values
Constructor Detail

LineRenderAttributes

public LineRenderAttributes()
Default constructor.

See Also:
RenderAttributes.RenderAttributes(int)

LineRenderAttributes

public LineRenderAttributes(LineRenderAttributes lra)
Shallow copy constructor.

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

LineRenderAttributes

public LineRenderAttributes(LineRenderAttributes lra,
                            LineRenderAttributes defaults)
Shallow copy constructor, with explicitly given default values.

If given defaults are null, given principal render attributes defaults are used, if available. If not, default attributes remains unset. In any case, they may be later set with RenderAttributes.setDefaults(com.davisor.graphics.RenderAttributes).

If given principal render attributes source lra is null, render attributes set size is copied from given defaults, if possible. If both arguments are null, render attribute set size and defaults remain undetermined.

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

LineRenderAttributes

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

Minimum and maximum shape size values, if set, will define the size range to which the sizes of dynamically scaled shapes will mapped.

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)
alignment - initial alignment attribute values (RenderAttributes alignment code)
composite - initial composite attribute values (may be null)
defaults - default attribute values (may be null)

LineRenderAttributes

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

Minimum and maximum shape size values, if set, will define the size range to which the sizes of dynamically scaled shapes will mapped.

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)
alignments - initial alignment attribute values (array of RenderAttributes alignment codes, may be null)
composites - initial composite attribute values (may be null)
defaults - default attribute values (may be null)
Method Detail

dup

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

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

toString

protected void toString(java.lang.StringBuffer xml)
Generate XML attributes names. In particular, this method fills given string buffer with attributes generated by RenderAttributes.toString(int,String) that this method calls with appropriate arguments.

Overrides:
toString in class RenderAttributes
Parameters:
xml - string buffer to write xml attributes into
See Also:
RenderAttributes.toString(), RenderAttributes.toString(int,String)


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