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:
java.io.Serializable
,java.lang.Cloneable
,DialLayer
,PublicCloneable
- Enclosing class:
- DialPointer
public static class DialPointer.Pointer extends DialPointer
A dial pointer.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jfree.chart.plot.dial.DialPointer
DialPointer.Pin, DialPointer.Pointer
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Paint
fillPaint
The fill paint.private java.awt.Paint
outlinePaint
The outline paint.(package private) static long
serialVersionUID
For serialization.private double
widthRadius
The radius that defines the width of the pointer at the base.-
Fields inherited from class org.jfree.chart.plot.dial.DialPointer
datasetIndex, radius
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(java.awt.Graphics2D g2, DialPlot plot, java.awt.geom.Rectangle2D frame, java.awt.geom.Rectangle2D view)
Draws the pointer.boolean
equals(java.lang.Object obj)
Tests this pointer for equality with an arbitrary object.java.awt.Paint
getFillPaint()
Returns the fill paint.java.awt.Paint
getOutlinePaint()
Returns the outline paint.double
getWidthRadius()
Returns the width radius.int
hashCode()
Returns a hash code for this instance.private void
readObject(java.io.ObjectInputStream stream)
Provides serialization support.void
setFillPaint(java.awt.Paint paint)
Sets the fill paint and sends aDialLayerChangeEvent
to all registered listeners.void
setOutlinePaint(java.awt.Paint paint)
Sets the outline paint and sends aDialLayerChangeEvent
to all registered listeners.void
setWidthRadius(double radius)
Sets the width radius and sends aDialLayerChangeEvent
to all registered listeners.private void
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.-
Methods inherited from class org.jfree.chart.plot.dial.DialPointer
clone, getDatasetIndex, getRadius, isClippedToWindow, setDatasetIndex, setRadius
-
Methods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer
addChangeListener, hasListener, isVisible, notifyListeners, removeChangeListener, setVisible
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.chart.plot.dial.DialLayer
addChangeListener, hasListener, isVisible, removeChangeListener
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
widthRadius
private double widthRadius
The radius that defines the width of the pointer at the base.
-
fillPaint
private transient java.awt.Paint fillPaint
The fill paint.
-
outlinePaint
private transient java.awt.Paint outlinePaint
The outline paint.
-
-
Method Detail
-
getWidthRadius
public double getWidthRadius()
Returns the width radius.- Returns:
- The width radius.
- See Also:
setWidthRadius(double)
-
setWidthRadius
public void setWidthRadius(double radius)
Sets the width radius and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
radius
- the radius- See Also:
getWidthRadius()
-
getFillPaint
public java.awt.Paint getFillPaint()
Returns the fill paint.- Returns:
- The paint (never
null
). - See Also:
setFillPaint(Paint)
-
setFillPaint
public void setFillPaint(java.awt.Paint paint)
Sets the fill paint and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getFillPaint()
-
getOutlinePaint
public java.awt.Paint getOutlinePaint()
Returns the outline paint.- Returns:
- The paint (never
null
). - See Also:
setOutlinePaint(Paint)
-
setOutlinePaint
public void setOutlinePaint(java.awt.Paint paint)
Sets the outline paint and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getOutlinePaint()
-
draw
public void draw(java.awt.Graphics2D g2, DialPlot plot, java.awt.geom.Rectangle2D frame, java.awt.geom.Rectangle2D view)
Draws the pointer.- Parameters:
g2
- the graphics target.plot
- the plot.frame
- the dial's reference frame.view
- the dial's view.
-
equals
public boolean equals(java.lang.Object obj)
Tests this pointer for equality with an arbitrary object.- Overrides:
equals
in classDialPointer
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCode
in classDialPointer
- Returns:
- A hash code.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
Provides 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.ClassNotFoundException
Provides 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.
-
-