org.jfree.chart.plot.dial

Class DialPointer

Implemented Interfaces:
Cloneable, DialLayer, PublicCloneable, Serializable
Known Direct 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.
Since:
1.0.7

Nested Class Summary

static class
DialPointer.Pin
A dial pointer that draws a thin line (like a pin).
static class
DialPointer.Pointer
A dial pointer.

Constructor Summary

DialPointer()
Creates a new DialPointer instance.
DialPointer(int datasetIndex)
Creates a new pointer for the specified dataset.

Method Summary

Object
clone()
Returns a clone of the pointer.
boolean
equals(Object obj)
Checks this instance for equality with an arbitrary object.
int
getDatasetIndex()
Returns the dataset index that the pointer maps to.
double
getRadius()
Returns the radius of the pointer, as a percentage of the dial's framing rectangle.
int
hashCode()
Returns a hash code.
boolean
isClippedToWindow()
Returns true 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 a DialLayerChangeEvent to all registered listeners.
void
setRadius(double radius)
Sets the radius of the pointer and sends a DialLayerChangeEvent to all registered listeners.

Methods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer

addChangeListener, clone, equals, hasListener, hashCode, isVisible, notifyListeners, removeChangeListener, setVisible

Constructor Details

DialPointer

protected DialPointer()
Creates a new DialPointer instance.

DialPointer

protected DialPointer(int datasetIndex)
Creates a new pointer for the specified dataset.
Parameters:
datasetIndex - the dataset index.

Method Details

clone

public Object clone()
            throws CloneNotSupportedException
Returns a clone of the pointer.
Overrides:
clone in interface AbstractDialLayer
Returns:
a clone.

equals

public boolean equals(Object obj)
Checks this instance for equality with an arbitrary object.
Overrides:
equals in interface AbstractDialLayer
Parameters:
obj - the object (null not permitted).
Returns:
A boolean.

getDatasetIndex

public int getDatasetIndex()
Returns the dataset index that the pointer maps to.
Returns:
The dataset index.

getRadius

public double getRadius()
Returns the radius of the pointer, as a percentage of the dial's framing rectangle.
Returns:
The radius.

hashCode

public int hashCode()
Returns a hash code.
Overrides:
hashCode in interface AbstractDialLayer
Returns:
A hash code.

isClippedToWindow

public boolean isClippedToWindow()
Returns true to indicate that this layer should be clipped within the dial window.
Specified by:
isClippedToWindow in interface DialLayer
Returns:
true.

setDatasetIndex

public void setDatasetIndex(int index)
Sets the dataset index for the pointer and sends a DialLayerChangeEvent to all registered listeners.
Parameters:
index - the index.

setRadius

public void setRadius(double radius)
Sets the radius of the pointer and sends a DialLayerChangeEvent to all registered listeners.
Parameters:
radius - the radius.
See Also:
getRadius()