Package org.jfree.chart.plot.dial
Class DialPointer.Pointer
java.lang.Object
org.jfree.chart.plot.dial.AbstractDialLayer
org.jfree.chart.plot.dial.DialPointer
org.jfree.chart.plot.dial.DialPointer.Pointer
- All Implemented Interfaces:
Serializable,Cloneable,DialLayer,PublicCloneable
- Enclosing class:
DialPointer
A dial pointer.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jfree.chart.plot.dial.DialPointer
DialPointer.Pin, DialPointer.Pointer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PaintThe fill paint.private PaintThe outline paint.(package private) static final longFor serialization.private doubleThe radius that defines the width of the pointer at the base.Fields inherited from class org.jfree.chart.plot.dial.DialPointer
datasetIndex, radius -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view) Draws the pointer.booleanTests this pointer for equality with an arbitrary object.Returns the fill paint.Returns the outline paint.doubleReturns the width radius.inthashCode()Returns a hash code for this instance.private voidreadObject(ObjectInputStream stream) Provides serialization support.voidsetFillPaint(Paint paint) Sets the fill paint and sends aDialLayerChangeEventto all registered listeners.voidsetOutlinePaint(Paint paint) Sets the outline paint and sends aDialLayerChangeEventto all registered listeners.voidsetWidthRadius(double radius) Sets the width radius and sends aDialLayerChangeEventto all registered listeners.private voidwriteObject(ObjectOutputStream stream) Provides serialization support.Methods inherited from class org.jfree.chart.plot.dial.DialPointer
clone, getDatasetIndex, getRadius, isClippedToWindow, setDatasetIndex, setRadiusMethods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer
addChangeListener, hasListener, isVisible, notifyListeners, removeChangeListener, setVisibleMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart.plot.dial.DialLayer
addChangeListener, hasListener, isVisible, removeChangeListener
-
Field Details
-
serialVersionUID
static final long serialVersionUIDFor serialization.- See Also:
-
widthRadius
private double widthRadiusThe radius that defines the width of the pointer at the base. -
fillPaint
The fill paint. -
outlinePaint
The outline paint.
-
-
Constructor Details
-
Pointer
public Pointer()Creates a new instance. -
Pointer
public Pointer(int datasetIndex) Creates a new instance.- Parameters:
datasetIndex- the dataset index.
-
-
Method Details
-
getWidthRadius
public double getWidthRadius()Returns the width radius.- Returns:
- The width radius.
- See Also:
-
setWidthRadius
public void setWidthRadius(double radius) Sets the width radius and sends aDialLayerChangeEventto all registered listeners.- Parameters:
radius- the radius- See Also:
-
getFillPaint
Returns the fill paint.- Returns:
- The paint (never
null). - See Also:
-
setFillPaint
Sets the fill paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
-
getOutlinePaint
Returns the outline paint.- Returns:
- The paint (never
null). - See Also:
-
setOutlinePaint
Sets the outline paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
-
draw
Draws the pointer.- Parameters:
g2- the graphics target.plot- the plot.frame- the dial's reference frame.view- the dial's view.
-
equals
Tests this pointer for equality with an arbitrary object.- Overrides:
equalsin classDialPointer- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()Returns a hash code for this instance.- Overrides:
hashCodein classDialPointer- Returns:
- A hash code.
-
writeObject
Provides serialization support.- Parameters:
stream- the output stream.- Throws:
IOException- if there is an I/O error.
-
readObject
Provides serialization support.- Parameters:
stream- the input stream.- Throws:
IOException- if there is an I/O error.ClassNotFoundException- if there is a classpath problem.
-