Package org.jfree.chart.plot.dial
Class DialPointer
java.lang.Object
org.jfree.chart.plot.dial.AbstractDialLayer
org.jfree.chart.plot.dial.DialPointer
- All Implemented Interfaces:
Serializable
,Cloneable
,DialLayer
,PublicCloneable
- Direct Known Subclasses:
DialPointer.Pin
,DialPointer.Pointer
public abstract class DialPointer
extends AbstractDialLayer
implements DialLayer, Cloneable, PublicCloneable, Serializable
A base class for the pointer in a
DialPlot
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A dial pointer that draws a thin line (like a pin).static class
A dial pointer. -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a newDialPointer
instance.protected
DialPointer
(int datasetIndex) Creates a new pointer for the specified dataset. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of the pointer.boolean
Checks this instance for equality with an arbitrary object.int
Returns the dataset index that the pointer maps to.double
Returns the radius of the pointer, as a percentage of the dial's framing rectangle.int
hashCode()
Returns a hash code.boolean
Returnstrue
to indicate that this layer should be clipped within the dial window.void
setDatasetIndex
(int index) Sets the dataset index for the pointer and sends aDialLayerChangeEvent
to all registered listeners.void
setRadius
(double radius) Sets the radius of the pointer and sends aDialLayerChangeEvent
to all registered listeners.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, draw, hasListener, isVisible, removeChangeListener
-
Constructor Details
-
DialPointer
protected DialPointer()Creates a newDialPointer
instance. -
DialPointer
Creates a new pointer for the specified dataset.- Parameters:
datasetIndex
- the dataset index.
-
-
Method Details
-
getDatasetIndex
Returns the dataset index that the pointer maps to.- Returns:
- The dataset index.
- See Also:
-
setDatasetIndex
Sets the dataset index for the pointer and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
index
- the index.- See Also:
-
getRadius
Returns the radius of the pointer, as a percentage of the dial's framing rectangle.- Returns:
- The radius.
- See Also:
-
setRadius
Sets the radius of the pointer and sends aDialLayerChangeEvent
to all registered listeners.- Parameters:
radius
- the radius.- See Also:
-
isClippedToWindow
Returnstrue
to indicate that this layer should be clipped within the dial window.- Specified by:
isClippedToWindow
in interfaceDialLayer
- Returns:
true
.
-
equals
Checks this instance for equality with an arbitrary object.- Overrides:
equals
in classAbstractDialLayer
- Parameters:
obj
- the object (null
not permitted).- Returns:
- A boolean.
-
hashCode
Returns a hash code.- Overrides:
hashCode
in classAbstractDialLayer
- Returns:
- A hash code.
-
clone
Returns a clone of the pointer.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classAbstractDialLayer
- Returns:
- a clone.
- Throws:
CloneNotSupportedException
- if one of the attributes cannot be cloned.
-