Package org.jfree.chart.block
Class LineBorder
- java.lang.Object
-
- org.jfree.chart.block.LineBorder
-
- All Implemented Interfaces:
java.io.Serializable,BlockFrame
public class LineBorder extends java.lang.Object implements BlockFrame, java.io.Serializable
A line border for anyAbstractBlock.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private RectangleInsetsinsetsThe insets.private java.awt.PaintpaintThe line color.(package private) static longserialVersionUIDFor serialization.private java.awt.StrokestrokeThe line stroke.
-
Constructor Summary
Constructors Constructor Description LineBorder()Creates a default border.LineBorder(java.awt.Paint paint, java.awt.Stroke stroke, RectangleInsets insets)Creates a new border with the specified color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)Draws the border by filling in the reserved space (in black).booleanequals(java.lang.Object obj)Tests this border for equality with an arbitrary instance.RectangleInsetsgetInsets()Returns the insets.java.awt.PaintgetPaint()Returns the paint.java.awt.StrokegetStroke()Returns the stroke.inthashCode()private voidreadObject(java.io.ObjectInputStream stream)Provides serialization support.private voidwriteObject(java.io.ObjectOutputStream stream)Provides serialization support.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
paint
private transient java.awt.Paint paint
The line color.
-
stroke
private transient java.awt.Stroke stroke
The line stroke.
-
insets
private RectangleInsets insets
The insets.
-
-
Constructor Detail
-
LineBorder
public LineBorder()
Creates a default border.
-
LineBorder
public LineBorder(java.awt.Paint paint, java.awt.Stroke stroke, RectangleInsets insets)Creates a new border with the specified color.- Parameters:
paint- the color (nullnot permitted).stroke- the border stroke (nullnot permitted).insets- the insets (nullnot permitted).
-
-
Method Detail
-
getPaint
public java.awt.Paint getPaint()
Returns the paint.- Returns:
- The paint (never
null).
-
getInsets
public RectangleInsets getInsets()
Returns the insets.- Specified by:
getInsetsin interfaceBlockFrame- Returns:
- The insets (never
null).
-
getStroke
public java.awt.Stroke getStroke()
Returns the stroke.- Returns:
- The stroke (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).- Specified by:
drawin interfaceBlockFrame- 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.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOExceptionProvides serialization support.- Parameters:
stream- the output stream.- Throws:
java.io.IOException- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionProvides serialization support.- Parameters:
stream- the input stream.- Throws:
java.io.IOException- if there is an I/O error.java.lang.ClassNotFoundException- if there is a classpath problem.
-
-