Package org.jfree.chart.plot.dial
Class DialPointer.Pin
java.lang.Object
org.jfree.chart.plot.dial.AbstractDialLayer
org.jfree.chart.plot.dial.DialPointer
org.jfree.chart.plot.dial.DialPointer.Pin
- All Implemented Interfaces:
Serializable
,Cloneable
,DialLayer
,PublicCloneable
- Enclosing class:
DialPointer
A dial pointer that draws a thin line (like a pin).
- 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 Paint
The paint.(package private) static final long
For serialization.private Stroke
The stroke.Fields inherited from class org.jfree.chart.plot.dial.DialPointer
datasetIndex, radius
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view) Draws the pointer.boolean
Tests this pointer for equality with an arbitrary object.getPaint()
Returns the paint.Returns the stroke.int
hashCode()
Returns a hash code for this instance.private void
readObject
(ObjectInputStream stream) Provides serialization support.void
Sets the paint and sends aDialLayerChangeEvent
to all registered listeners.void
Sets the stroke and sends aDialLayerChangeEvent
to all registered listeners.private void
writeObject
(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 Details
-
serialVersionUID
static final long serialVersionUIDFor serialization.- See Also:
-
paint
The paint. -
stroke
The stroke.
-
-
Constructor Details
-
Pin
public Pin()Creates a new instance. -
Pin
public Pin(int datasetIndex) Creates a new instance.- Parameters:
datasetIndex
- the dataset index.
-
-
Method Details
-
getPaint
Returns the paint.- Returns:
- The paint (never
null
). - See Also:
-
setPaint
Sets the paint and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
-
getStroke
Returns the stroke.- Returns:
- The stroke (never
null
). - See Also:
-
setStroke
Sets the stroke and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
not 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:
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
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.
-