com.davisor.graphics.chart
Class LegendRenderAttributes

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

public class LegendRenderAttributes
extends RenderAttributes

LegendRenderAttributes represents chart legend rendering attributes. The attributes control in particular the following legend area aspects:

The legend background stroke and color attributes control a legend's outer borderline appearance. The stroke sets the borderline style and width, while the color attribute defines the paint used to draw the borderline. The background paint is used to fill the legend background area.

Label font and color define the style and color for the label texts.

Since:
JDK1.2
See Also:
LegendAttributes, Serialized Form

Field Summary
static int BACK
          Index for the background attribute set (1).
static int DEFAULTS
          Index for the default attributes set (0).
static int LABEL
          Index for the label attribute set (2).
static int LEGEND
          Index for the legend attribute set (3).
static int NROFSETS
          Number of render attributes (4).
 
Fields inherited from class com.davisor.graphics.RenderAttributes
ANTIALIASINDEX, ANTIALIASWORDS, AUTO, CEILING, CENTER, DIAGONAL, DOWN, FLOOR, FRONT, GRAPHICS, HORIZONTAL, INSIDE, LEFT, LEFTWALL, LINE, 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
LegendRenderAttributes()
          Default constructor.
LegendRenderAttributes(LegendRenderAttributes ra)
          Shallow copy constructor.
LegendRenderAttributes(LegendRenderAttributes ra, LegendRenderAttributes defaults)
          Shallow copy constructor, with explicitly given default values.
LegendRenderAttributes(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.
 java.lang.String toString()
          Gets 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 attributes set (0).

See Also:
Constant Field Values

BACK

public static final int BACK
Index for the background attribute set (1).

See Also:
Constant Field Values

LABEL

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

See Also:
Constant Field Values

LEGEND

public static final int LEGEND
Index for the legend attribute set (3).

See Also:
Constant Field Values

NROFSETS

public static final int NROFSETS
Number of render attributes (4).

See Also:
Constant Field Values
Constructor Detail

LegendRenderAttributes

public LegendRenderAttributes()
Default constructor.

See Also:
RenderAttributes.RenderAttributes(int)

LegendRenderAttributes

public LegendRenderAttributes(LegendRenderAttributes ra)
Shallow copy constructor.

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

LegendRenderAttributes

public LegendRenderAttributes(LegendRenderAttributes ra,
                              LegendRenderAttributes defaults)
Shallow copy constructor, with explicitly 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)

LegendRenderAttributes

public LegendRenderAttributes(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. The values will be installed in 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)
alignment - initial alignment 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)
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

public java.lang.String toString()
Gets rendering attributes XML representation.

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


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