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:
java.io.Serializable,java.lang.Cloneable,DialLayer,PublicCloneable
- Enclosing class:
- DialPointer
public static class DialPointer.Pin extends DialPointer
A dial pointer that draws a thin line (like a pin).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jfree.chart.plot.dial.DialPointer
DialPointer.Pin, DialPointer.Pointer
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.PaintpaintThe paint.(package private) static longserialVersionUIDFor serialization.private java.awt.StrokestrokeThe stroke.-
Fields inherited from class org.jfree.chart.plot.dial.DialPointer
datasetIndex, radius
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(java.awt.Graphics2D g2, DialPlot plot, java.awt.geom.Rectangle2D frame, java.awt.geom.Rectangle2D view)Draws the pointer.booleanequals(java.lang.Object obj)Tests this pointer for equality with an arbitrary object.java.awt.PaintgetPaint()Returns the paint.java.awt.StrokegetStroke()Returns the stroke.inthashCode()Returns a hash code for this instance.private voidreadObject(java.io.ObjectInputStream stream)Provides serialization support.voidsetPaint(java.awt.Paint paint)Sets the paint and sends aDialLayerChangeEventto all registered listeners.voidsetStroke(java.awt.Stroke stroke)Sets the stroke and sends aDialLayerChangeEventto all registered listeners.private voidwriteObject(java.io.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 Detail
-
serialVersionUID
static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
paint
private transient java.awt.Paint paint
The paint.
-
stroke
private transient java.awt.Stroke stroke
The stroke.
-
-
Method Detail
-
getPaint
public java.awt.Paint getPaint()
Returns the paint.- Returns:
- The paint (never
null). - See Also:
setPaint(Paint)
-
setPaint
public void setPaint(java.awt.Paint paint)
Sets the paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
getPaint()
-
getStroke
public java.awt.Stroke getStroke()
Returns the stroke.- Returns:
- The stroke (never
null). - See Also:
setStroke(Stroke)
-
setStroke
public void setStroke(java.awt.Stroke stroke)
Sets the stroke and sends aDialLayerChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot permitted).- See Also:
getStroke()
-
draw
public void draw(java.awt.Graphics2D g2, DialPlot plot, java.awt.geom.Rectangle2D frame, java.awt.geom.Rectangle2D view)Draws the pointer.- Parameters:
g2- the graphics target.plot- the plot.frame- the dial's reference frame.view- the dial's view.
-
equals
public boolean equals(java.lang.Object obj)
Tests this pointer for equality with an arbitrary object.- Overrides:
equalsin classDialPointer- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classDialPointer- Returns:
- A hash code.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOExceptionProvides serialization support.- Parameters:
stream- the output stream.- Throws:
java.io.IOException- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionProvides serialization support.- Parameters:
stream- the input stream.- Throws:
java.io.IOException- if there is an I/O error.java.lang.ClassNotFoundException- if there is a classpath problem.
-
-