org.jfree.chart.plot.dial

Class DialPointer.Pin

Enclosing Class:
DialPointer
Implemented Interfaces:
Cloneable, DialLayer, PublicCloneable, Serializable

public static class DialPointer.Pin
extends DialPointer

A dial pointer that draws a thin line (like a pin).

Nested Class Summary

Nested classes/interfaces inherited from class org.jfree.chart.plot.dial.DialPointer

DialPointer.Pin, DialPointer.Pointer

Constructor Summary

Pin()
Creates a new instance.
Pin(int datasetIndex)
Creates a new instance.

Method Summary

void
draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the pointer.
boolean
equals(Object obj)
Tests this pointer for equality with an arbitrary object.
Paint
getPaint()
Returns the paint.
Stroke
getStroke()
Returns the stroke.
int
hashCode()
Returns a hash code for this instance.
void
setPaint(Paint paint)
Sets the paint and sends a DialLayerChangeEvent to all registered listeners.
void
setStroke(Stroke stroke)
Sets the stroke and sends a DialLayerChangeEvent to all registered listeners.

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

clone, equals, getDatasetIndex, getRadius, hashCode, isClippedToWindow, setDatasetIndex, setRadius

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

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

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

draw

public void draw(Graphics2D g2,
                 DialPlot plot,
                 Rectangle2D frame,
                 Rectangle2D view)
Draws the pointer.
Specified by:
draw in interface DialLayer
Parameters:
g2 - the graphics target.
plot - the plot.
frame - the dial's reference frame.
view - the dial's view.

equals

public boolean equals(Object obj)
Tests this pointer for equality with an arbitrary object.
Overrides:
equals in interface DialPointer
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

getPaint

public Paint getPaint()
Returns the paint.
Returns:
The paint (never null).

getStroke

public Stroke getStroke()
Returns the stroke.
Returns:
The stroke (never null).

hashCode

public int hashCode()
Returns a hash code for this instance.
Overrides:
hashCode in interface DialPointer
Returns:
A hash code.

setPaint

public void setPaint(Paint paint)
Sets the paint and sends a DialLayerChangeEvent to all registered listeners.
Parameters:
paint - the paint (null not permitted).
See Also:
getPaint()

setStroke

public void setStroke(Stroke stroke)
Sets the stroke and sends a DialLayerChangeEvent to all registered listeners.
Parameters:
stroke - the stroke (null not permitted).
See Also:
getStroke()