com.ijchart.xychart.ui.supplier
Class DefaultDrawingSupplier

java.lang.Object
  extended by com.ijchart.xychart.ui.supplier.DefaultDrawingSupplier
All Implemented Interfaces:
IDrawingSupplier

public class DefaultDrawingSupplier
extends java.lang.Object
implements IDrawingSupplier

Title: IJChart

Description: a chart library for the Java(tm) platform.

The default implementation of interface DefaultDrawingSupplier.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Field Summary
static java.awt.Paint[] DEFAULT_BORDER_PAINT_SEQUENCE
           The default border paint sequence.
static java.awt.Stroke[] DEFAULT_BORDER_STROKE_SEQUENCE
           The default border stroke sequence.
static boolean DEFAULT_CAN_RESET
           A default boolean flag controls whether or not can reset.
static java.awt.Paint[] DEFAULT_FILL_PAINT_SEQUENCE
           The default fill paint sequence.
static java.awt.Paint[] DEFAULT_PAINT_SEQUENCE
           The default paint sequence.
static java.awt.Shape[] DEFAULT_SHAPE_SEQUENCE
           The default shape sequence.
static java.awt.Stroke[] DEFAULT_STROKE_SEQUENCE
           The default stroke sequence.
 
Constructor Summary
DefaultDrawingSupplier()
           Creates a new supplier, with default sequences for fill paint, border paint, stroke and shapes.
DefaultDrawingSupplier(java.awt.Paint[] paintSequence, java.awt.Paint[] fillPaintSequence, java.awt.Paint[] borderPaintSequence, java.awt.Stroke[] strokeSequence, java.awt.Stroke[] borderStrokeSequence, java.awt.Shape[] shapeSequence)
           Creates a new supplier (null not permitted).
DefaultDrawingSupplier(java.awt.Paint[] paintSequence, java.awt.Paint[] borderPaintSequence, java.awt.Stroke[] strokeSequence, java.awt.Stroke[] borderStrokeSequence, java.awt.Shape[] shapeSequence)
           Creates a new supplier (null not permitted).
 
Method Summary
 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.
 java.awt.Paint getNextBorderPaint()
           Returns the next border paint in a sequence maintained by the supplier.
 java.awt.Stroke getNextBorderStroke()
           Returns the next Stroke object in a sequence maintained by the supplier.
 java.awt.Paint getNextFillPaint()
           Returns the next fill paint in a sequence maintained by the supplier.
 java.awt.Paint getNextPaint()
           Returns the next paint in a sequence maintained by the supplier.
 java.awt.Shape getNextShape()
           Returns the next Shape object in a sequence maintained by the supplier.
 java.awt.Stroke getNextStroke()
           Returns the next Stroke object in a sequence maintained by the supplier.
 int hashCode()
           Returns a hash code value for the object
 boolean isCanReset()
           Whether or not can reset.
 void reset()
           Reset this class to first initiate state.
 void restoreState()
           Restore state to old.
 void saveState()
           Save current state.
 void setCanReset(boolean flag)
           Sets whether or not can reset.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAINT_SEQUENCE

public static final java.awt.Paint[] DEFAULT_PAINT_SEQUENCE
The default paint sequence.


DEFAULT_BORDER_PAINT_SEQUENCE

public static final java.awt.Paint[] DEFAULT_BORDER_PAINT_SEQUENCE
The default border paint sequence.


DEFAULT_FILL_PAINT_SEQUENCE

public static final java.awt.Paint[] DEFAULT_FILL_PAINT_SEQUENCE
The default fill paint sequence.


DEFAULT_STROKE_SEQUENCE

public static final java.awt.Stroke[] DEFAULT_STROKE_SEQUENCE
The default stroke sequence.


DEFAULT_BORDER_STROKE_SEQUENCE

public static final java.awt.Stroke[] DEFAULT_BORDER_STROKE_SEQUENCE
The default border stroke sequence.


DEFAULT_SHAPE_SEQUENCE

public static final java.awt.Shape[] DEFAULT_SHAPE_SEQUENCE
The default shape sequence.


DEFAULT_CAN_RESET

public static final boolean DEFAULT_CAN_RESET
A default boolean flag controls whether or not can reset.

See Also:
Constant Field Values
Constructor Detail

DefaultDrawingSupplier

public DefaultDrawingSupplier()
Creates a new supplier, with default sequences for fill paint, border paint, stroke and shapes.


DefaultDrawingSupplier

public DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
                              java.awt.Paint[] borderPaintSequence,
                              java.awt.Stroke[] strokeSequence,
                              java.awt.Stroke[] borderStrokeSequence,
                              java.awt.Shape[] shapeSequence)
Creates a new supplier (null not permitted).

Parameters:
paintSequence - Paint[] The paint sequence (null not permitted).
borderPaintSequence - Paint[] The border paint sequence (null not permitted).
strokeSequence - Stroke[] The stroke sequence (null not permitted).
borderStrokeSequence - Stroke[] The border stroke sequence (null not permitted).
shapeSequence - Shape[] The shape sequence (null not permitted).

DefaultDrawingSupplier

public DefaultDrawingSupplier(java.awt.Paint[] paintSequence,
                              java.awt.Paint[] fillPaintSequence,
                              java.awt.Paint[] borderPaintSequence,
                              java.awt.Stroke[] strokeSequence,
                              java.awt.Stroke[] borderStrokeSequence,
                              java.awt.Shape[] shapeSequence)
Creates a new supplier (null not permitted).

Parameters:
paintSequence - Paint[] The paint sequence (null not permitted).
fillPaintSequence - Paint[] The fill paint sequence (null not permitted).
borderPaintSequence - Paint[] The border paint sequence (null not permitted).
strokeSequence - Stroke[] The stroke sequence (null not permitted).
borderStrokeSequence - Stroke[] The border stroke sequence (null not permitted).
shapeSequence - Shape[] The shape sequence (null not permitted).
Method Detail

getNextPaint

public java.awt.Paint getNextPaint()
Returns the next paint in a sequence maintained by the supplier.

Specified by:
getNextPaint in interface IDrawingSupplier
Returns:
Paint The paint (never null).

getNextBorderPaint

public java.awt.Paint getNextBorderPaint()
Returns the next border paint in a sequence maintained by the supplier.

Specified by:
getNextBorderPaint in interface IDrawingSupplier
Returns:
Paint The paint (never null).

getNextFillPaint

public java.awt.Paint getNextFillPaint()
Returns the next fill paint in a sequence maintained by the supplier.

Specified by:
getNextFillPaint in interface IDrawingSupplier
Returns:
Paint The paint (never null).

getNextStroke

public java.awt.Stroke getNextStroke()
Returns the next Stroke object in a sequence maintained by the supplier.

Specified by:
getNextStroke in interface IDrawingSupplier
Returns:
Stroke The Stroke (never null).

getNextBorderStroke

public java.awt.Stroke getNextBorderStroke()
Returns the next Stroke object in a sequence maintained by the supplier.

Specified by:
getNextBorderStroke in interface IDrawingSupplier
Returns:
Stroke The Stroke (never null).

getNextShape

public java.awt.Shape getNextShape()
Returns the next Shape object in a sequence maintained by the supplier.

Specified by:
getNextShape in interface IDrawingSupplier
Returns:
Shape The shape (never null).

createStandardSeriesShapes

public static java.awt.Shape[] createStandardSeriesShapes()
Creates an array of standard shapes to display for the items in series on charts.

Returns:
Shape[] The shape array (never null).

equals

public boolean equals(java.lang.Object obj)
Tests this object for equality with another object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

isCanReset

public boolean isCanReset()
Whether or not can reset.

Specified by:
isCanReset in interface IDrawingSupplier
Returns:
boolean A boolean.

setCanReset

public void setCanReset(boolean flag)
Sets whether or not can reset.

Specified by:
setCanReset in interface IDrawingSupplier
Parameters:
flag - boolean A boolean.

reset

public void reset()
Reset this class to first initiate state.

Specified by:
reset in interface IDrawingSupplier

saveState

public void saveState()
Save current state.

Specified by:
saveState in interface IDrawingSupplier

restoreState

public void restoreState()
Restore state to old.

Specified by:
restoreState in interface IDrawingSupplier

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone.

Overrides:
clone in class java.lang.Object
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if a component of the supplier does not support cloning.