public class

DialValueIndicator

extends AbstractDialLayer
implements Serializable Cloneable DialLayer
java.lang.Object
   ↳ org.jfree.chart.plot.dial.AbstractDialLayer
     ↳ org.jfree.chart.plot.dial.DialValueIndicator

Class Overview

A value indicator for a DialPlot.

Summary

Public Constructors
DialValueIndicator()
Creates a new instance of DialValueIndicator.
DialValueIndicator(int datasetIndex)
Creates a new instance of DialValueIndicator.
Public Methods
Object clone()
Returns a clone of this instance.
void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the background to the specified graphics device.
boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
double getAngle()
Returns the angle for the anchor point.
Paint getBackgroundPaint()
Returns the background paint.
int getDatasetIndex()
Returns the index of the dataset from which this indicator fetches its current value.
Font getFont()
Returns the font.
RectangleAnchor getFrameAnchor()
Returns the frame anchor.
RectangleInsets getInsets()
Returns the insets.
NumberFormat getNumberFormat()
Returns the formatter used to format the value.
Paint getOutlinePaint()
Returns the outline paint.
Stroke getOutlineStroke()
Returns the outline stroke.
Paint getPaint()
Returns the paint.
double getRadius()
Returns the radius.
Number getTemplateValue()
Returns the template value.
TextAnchor getTextAnchor()
Returns the text anchor.
RectangleAnchor getValueAnchor()
Returns the value anchor.
int hashCode()
Returns a hash code for this instance.
boolean isClippedToWindow()
Returns true to indicate that this layer should be clipped within the dial window.
void setAngle(double angle)
Sets the angle for the anchor point and sends a DialLayerChangeEvent to all registered listeners.
void setBackgroundPaint(Paint paint)
Sets the background paint and sends a DialLayerChangeEvent to all registered listeners.
void setDatasetIndex(int index)
Sets the dataset index and sends a DialLayerChangeEvent to all registered listeners.
void setFont(Font font)
Sets the font and sends a DialLayerChangeEvent to all registered listeners.
void setFrameAnchor(RectangleAnchor anchor)
Sets the frame anchor and sends a DialLayerChangeEvent to all registered listeners.
void setInsets(RectangleInsets insets)
Sets the insets and sends a DialLayerChangeEvent to all registered listeners.
void setNumberFormat(NumberFormat formatter)
Sets the formatter used to format the value and sends a DialLayerChangeEvent to all registered listeners.
void setOutlinePaint(Paint paint)
Sets the outline paint and sends a DialLayerChangeEvent to all registered listeners.
void setOutlineStroke(Stroke stroke)
Sets the outline stroke and sends a DialLayerChangeEvent to all registered listeners.
void setPaint(Paint paint)
Sets the paint and sends a DialLayerChangeEvent to all registered listeners.
void setRadius(double radius)
Sets the radius and sends a DialLayerChangeEvent to all registered listeners.
void setTemplateValue(Number value)
Sets the template value and sends a DialLayerChangeEvent to all registered listeners.
void setTextAnchor(TextAnchor anchor)
Sets the text anchor and sends a DialLayerChangeEvent to all registered listeners.
void setValueAnchor(RectangleAnchor anchor)
Sets the value anchor and sends a DialLayerChangeEvent to all registered listeners.
[Expand]
Inherited Methods
From class org.jfree.chart.plot.dial.AbstractDialLayer
From class java.lang.Object
From interface org.jfree.chart.plot.dial.DialLayer

Public Constructors

public DialValueIndicator ()

Creates a new instance of DialValueIndicator.

public DialValueIndicator (int datasetIndex)

Creates a new instance of DialValueIndicator.

Parameters
datasetIndex the dataset index.

Public Methods

public Object clone ()

Returns a clone of this instance.

Returns
  • The clone.
Throws
CloneNotSupportedException if some attribute of this instance cannot be cloned.

public void draw (Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)

Draws the background to the specified graphics device. If the dial frame specifies a window, the clipping region will already have been set to this window before this method is called.

Parameters
g2 the graphics device (null not permitted).
plot the plot (ignored here).
frame the dial frame (ignored here).
view the view rectangle (null not permitted).

public boolean equals (Object obj)

Tests this instance for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public double getAngle ()

Returns the angle for the anchor point. The angle is specified in degrees using the same orientation as Java's Arc2D class.

Returns
  • The angle (in degrees).
See Also

public Paint getBackgroundPaint ()

Returns the background paint.

Returns
  • The background paint.

public int getDatasetIndex ()

Returns the index of the dataset from which this indicator fetches its current value.

Returns
  • The dataset index.

public Font getFont ()

Returns the font.

Returns
  • The font (never null).
See Also

public RectangleAnchor getFrameAnchor ()

Returns the frame anchor.

Returns
  • The frame anchor.

public RectangleInsets getInsets ()

Returns the insets.

Returns
  • The insets (never null).

public NumberFormat getNumberFormat ()

Returns the formatter used to format the value.

Returns
  • The formatter (never null).

public Paint getOutlinePaint ()

Returns the outline paint.

Returns
  • The outline paint (never null).

public Stroke getOutlineStroke ()

Returns the outline stroke.

Returns
  • The outline stroke (never null).

public Paint getPaint ()

Returns the paint.

Returns
  • The paint (never null).
See Also

public double getRadius ()

Returns the radius.

Returns
  • The radius.

public Number getTemplateValue ()

Returns the template value.

Returns
  • The template value (never null).

public TextAnchor getTextAnchor ()

Returns the text anchor.

Returns
  • The text anchor (never null).

public RectangleAnchor getValueAnchor ()

Returns the value anchor.

Returns
  • The value anchor (never null).

public int hashCode ()

Returns a hash code for this instance.

Returns
  • The hash code.

public boolean isClippedToWindow ()

Returns true to indicate that this layer should be clipped within the dial window.

Returns
  • true.

public void setAngle (double angle)

Sets the angle for the anchor point and sends a DialLayerChangeEvent to all registered listeners.

Parameters
angle the angle (in degrees).
See Also

public void setBackgroundPaint (Paint paint)

Sets the background paint and sends a DialLayerChangeEvent to all registered listeners.

Parameters
paint the paint (null not permitted).

public void setDatasetIndex (int index)

Sets the dataset index and sends a DialLayerChangeEvent to all registered listeners.

Parameters
index the index.

public void setFont (Font font)

Sets the font and sends a DialLayerChangeEvent to all registered listeners.

Parameters
font the font (null not permitted).

public void setFrameAnchor (RectangleAnchor anchor)

Sets the frame anchor and sends a DialLayerChangeEvent to all registered listeners.

Parameters
anchor the anchor (null not permitted).
See Also

public void setInsets (RectangleInsets insets)

Sets the insets and sends a DialLayerChangeEvent to all registered listeners.

Parameters
insets the insets (null not permitted).
See Also

public void setNumberFormat (NumberFormat formatter)

Sets the formatter used to format the value and sends a DialLayerChangeEvent to all registered listeners.

Parameters
formatter the formatter (null not permitted).

public void setOutlinePaint (Paint paint)

Sets the outline paint and sends a DialLayerChangeEvent to all registered listeners.

Parameters
paint the paint (null not permitted).

public void setOutlineStroke (Stroke stroke)

Sets the outline stroke and sends a DialLayerChangeEvent to all registered listeners.

Parameters
stroke the stroke (null not permitted).

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

public void setRadius (double radius)

Sets the radius and sends a DialLayerChangeEvent to all registered listeners.

Parameters
radius the radius.
See Also

public void setTemplateValue (Number value)

Sets the template value and sends a DialLayerChangeEvent to all registered listeners.

Parameters
value the value (null not permitted).

public void setTextAnchor (TextAnchor anchor)

Sets the text anchor and sends a DialLayerChangeEvent to all registered listeners.

Parameters
anchor the anchor (null not permitted).
See Also

public void setValueAnchor (RectangleAnchor anchor)

Sets the value anchor and sends a DialLayerChangeEvent to all registered listeners.

Parameters
anchor the anchor (null not permitted).
See Also