Header
And More


org.jfree.chart.plot.dial
Class DialPointer

java.lang.Object
  extended by org.jfree.chart.plot.dial.AbstractDialLayer
      extended by org.jfree.chart.plot.dial.DialPointer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, DialLayer, org.jfree.util.PublicCloneable
Direct Known Subclasses:
DialPointer.Pin, DialPointer.Pointer

public abstract class DialPointer
extends AbstractDialLayer
implements DialLayer, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

A base class for the pointer in a DialPlot.

Since:
1.0.7
See Also:
Serialized Form

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
protected DialPointer()
          Creates a new DialPointer instance.
protected DialPointer(int datasetIndex)
          Creates a new pointer for the specified dataset.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the pointer.
 boolean equals(java.lang.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, 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 Detail

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 Detail

getDatasetIndex

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

Returns:
The dataset index.
See Also:
getDatasetIndex()

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.
See Also:
getDatasetIndex()

getRadius

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

Returns:
The radius.
See Also:
setRadius(double)

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()

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.

equals

public boolean equals(java.lang.Object obj)
Checks this instance for equality with an arbitrary object.

Overrides:
equals in class AbstractDialLayer
Parameters:
obj - the object (null not permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code.

Overrides:
hashCode in class AbstractDialLayer
Returns:
A hash code.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the pointer.

Specified by:
clone in interface org.jfree.util.PublicCloneable
Overrides:
clone in class AbstractDialLayer
Returns:
a clone.
Throws:
java.lang.CloneNotSupportedException - if one of the attributes cannot be cloned.

Footer
And More


Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.