public class DefaultDrawingSupplier extends java.lang.Object implements DrawingSupplier, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
DrawingSupplier interface. All
Plot instances have a new instance of this class installed by
default.| Modifier and Type | Field and Description |
|---|---|
static java.awt.Paint[] |
DEFAULT_FILL_PAINT_SEQUENCE
The default fill paint sequence.
|
static java.awt.Paint[] |
DEFAULT_OUTLINE_PAINT_SEQUENCE
The default outline paint sequence.
|
static java.awt.Stroke[] |
DEFAULT_OUTLINE_STROKE_SEQUENCE
The default outline stroke sequence.
|
static java.awt.Paint[] |
DEFAULT_PAINT_SEQUENCE
The default fill paint sequence.
|
static java.awt.Shape[] |
DEFAULT_SHAPE_SEQUENCE
The default shape sequence.
|
static java.awt.Stroke[] |
DEFAULT_STROKE_SEQUENCE
The default stroke sequence.
|
private int |
fillPaintIndex
The current fill paint index.
|
private java.awt.Paint[] |
fillPaintSequence
The fill paint sequence.
|
private int |
outlinePaintIndex
The current outline paint index.
|
private java.awt.Paint[] |
outlinePaintSequence
The outline paint sequence.
|
private int |
outlineStrokeIndex
The current outline stroke index.
|
private java.awt.Stroke[] |
outlineStrokeSequence
The outline stroke sequence.
|
private int |
paintIndex
The current paint index.
|
private java.awt.Paint[] |
paintSequence
The paint sequence.
|
private static long |
serialVersionUID
For serialization.
|
private int |
shapeIndex
The current shape index.
|
private java.awt.Shape[] |
shapeSequence
The shape sequence.
|
private int |
strokeIndex
The current stroke index.
|
private java.awt.Stroke[] |
strokeSequence
The stroke sequence.
|
| Constructor and Description |
|---|
DefaultDrawingSupplier()
Creates a new supplier, with default sequences for fill paint, outline
paint, stroke and shapes.
|
DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
java.awt.Paint[] fillPaintSequence,
java.awt.Paint[] outlinePaintSequence,
java.awt.Stroke[] strokeSequence,
java.awt.Stroke[] outlineStrokeSequence,
java.awt.Shape[] shapeSequence)
Creates a new supplier.
|
DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
java.awt.Paint[] outlinePaintSequence,
java.awt.Stroke[] strokeSequence,
java.awt.Stroke[] outlineStrokeSequence,
java.awt.Shape[] shapeSequence)
Creates a new supplier.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone.
|
static java.awt.Shape[] |
createStandardSeriesShapes()
Creates an array of standard shapes to display for the items in series
on charts.
|
boolean |
equals(java.lang.Object obj)
Tests this object for equality with another object.
|
private boolean |
equalShapes(java.awt.Shape[] s1,
java.awt.Shape[] s2)
A utility method for testing the equality of two arrays of shapes.
|
java.awt.Paint |
getNextFillPaint()
Returns the next fill paint in the sequence.
|
java.awt.Paint |
getNextOutlinePaint()
Returns the next outline paint in the sequence.
|
java.awt.Stroke |
getNextOutlineStroke()
Returns the next outline stroke in the sequence.
|
java.awt.Paint |
getNextPaint()
Returns the next paint in the sequence.
|
java.awt.Shape |
getNextShape()
Returns the next shape in the sequence.
|
java.awt.Stroke |
getNextStroke()
Returns the next stroke in the sequence.
|
private static int[] |
intArray(double a,
double b,
double c)
Helper method to avoid lots of explicit casts in getShape().
|
private static int[] |
intArray(double a,
double b,
double c,
double d)
Helper method to avoid lots of explicit casts in getShape().
|
private void |
readObject(java.io.ObjectInputStream stream)
Restores a serialized object.
|
private void |
writeObject(java.io.ObjectOutputStream stream)
Handles serialization.
|
private static final long serialVersionUID
public static final java.awt.Paint[] DEFAULT_PAINT_SEQUENCE
public static final java.awt.Paint[] DEFAULT_OUTLINE_PAINT_SEQUENCE
public static final java.awt.Paint[] DEFAULT_FILL_PAINT_SEQUENCE
public static final java.awt.Stroke[] DEFAULT_STROKE_SEQUENCE
public static final java.awt.Stroke[] DEFAULT_OUTLINE_STROKE_SEQUENCE
public static final java.awt.Shape[] DEFAULT_SHAPE_SEQUENCE
private transient java.awt.Paint[] paintSequence
private int paintIndex
private transient java.awt.Paint[] outlinePaintSequence
private int outlinePaintIndex
private transient java.awt.Paint[] fillPaintSequence
private int fillPaintIndex
private transient java.awt.Stroke[] strokeSequence
private int strokeIndex
private transient java.awt.Stroke[] outlineStrokeSequence
private int outlineStrokeIndex
private transient java.awt.Shape[] shapeSequence
private int shapeIndex
public DefaultDrawingSupplier()
public DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
java.awt.Paint[] outlinePaintSequence,
java.awt.Stroke[] strokeSequence,
java.awt.Stroke[] outlineStrokeSequence,
java.awt.Shape[] shapeSequence)
paintSequence - the fill paint sequence.outlinePaintSequence - the outline paint sequence.strokeSequence - the stroke sequence.outlineStrokeSequence - the outline stroke sequence.shapeSequence - the shape sequence.public DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
java.awt.Paint[] fillPaintSequence,
java.awt.Paint[] outlinePaintSequence,
java.awt.Stroke[] strokeSequence,
java.awt.Stroke[] outlineStrokeSequence,
java.awt.Shape[] shapeSequence)
paintSequence - the paint sequence.fillPaintSequence - the fill paint sequence.outlinePaintSequence - the outline paint sequence.strokeSequence - the stroke sequence.outlineStrokeSequence - the outline stroke sequence.shapeSequence - the shape sequence.public java.awt.Paint getNextPaint()
getNextPaint in interface DrawingSupplierpublic java.awt.Paint getNextOutlinePaint()
getNextOutlinePaint in interface DrawingSupplierpublic java.awt.Paint getNextFillPaint()
getNextFillPaint in interface DrawingSupplierpublic java.awt.Stroke getNextStroke()
getNextStroke in interface DrawingSupplierpublic java.awt.Stroke getNextOutlineStroke()
getNextOutlineStroke in interface DrawingSupplierpublic java.awt.Shape getNextShape()
getNextShape in interface DrawingSupplierpublic static java.awt.Shape[] createStandardSeriesShapes()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).private boolean equalShapes(java.awt.Shape[] s1,
java.awt.Shape[] s2)
s1 - the first array (null permitted).s2 - the second array (null permitted).private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O problem.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O problem.java.lang.ClassNotFoundException - if there is a problem loading a class.private static int[] intArray(double a,
double b,
double c)
a - xb - yc - zprivate static int[] intArray(double a,
double b,
double c,
double d)
a - xb - yc - zd - tpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if a component of the supplier does
not support cloning.