org.jfree.chart.block
Class BlockBorder

java.lang.Object
  extended byorg.jfree.chart.block.BlockBorder
All Implemented Interfaces:
java.io.Serializable

public class BlockBorder
extends java.lang.Object
implements java.io.Serializable

A border for a block. This class is immutable.

See Also:
Serialized Form

Field Summary
static BlockBorder NONE
          An empty border.
 
Constructor Summary
BlockBorder()
          Creates a default border.
BlockBorder(java.awt.Paint paint)
          Creates a new border with the specified color.
BlockBorder(RectangleInsets insets, java.awt.Paint paint)
          Creates a new border.
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
          Draws the border by filling in the reserved space (in black).
 boolean equals(java.lang.Object obj)
          Tests this border for equality with an arbitrary instance.
 RectangleInsets getInsets()
          Returns the space reserved for the border.
 java.awt.Paint getPaint()
          Returns the paint used to draw the border.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final BlockBorder NONE
An empty border.

Constructor Detail

BlockBorder

public BlockBorder()
Creates a default border.


BlockBorder

public BlockBorder(java.awt.Paint paint)
Creates a new border with the specified color.

Parameters:
paint - the color (null not permitted).

BlockBorder

public BlockBorder(RectangleInsets insets,
                   java.awt.Paint paint)
Creates a new border.

Parameters:
insets - the border insets (null not permitted).
paint - the paint (null not permitted).
Method Detail

getInsets

public RectangleInsets getInsets()
Returns the space reserved for the border.

Returns:
The space (never null).

getPaint

public java.awt.Paint getPaint()
Returns the paint used to draw the border.

Returns:
The paint (never null).

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D area)
Draws the border by filling in the reserved space (in black).

Parameters:
g2 - the graphics device.
area - the area.

equals

public boolean equals(java.lang.Object obj)
Tests this border for equality with an arbitrary instance.

Parameters:
obj - the object (null permitted).
Returns:
A boolean.