public abstract class

MeterNeedle

extends Object
implements Serializable
java.lang.Object
   ↳ org.jfree.chart.needle.MeterNeedle
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The base class used to represent the needle on a CompassPlot.

Summary

Fields
protected static AffineTransform transform A transform.
Public Constructors
MeterNeedle()
Creates a new needle.
MeterNeedle(Paint outline, Paint fill, Paint highlight)
Creates a new needle.
Public Methods
void draw(Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle)
Draws the needle.
void draw(Graphics2D g2, Rectangle2D plotArea, double angle)
Draws the needle.
void draw(Graphics2D g2, Rectangle2D plotArea)
Draws the needle.
boolean equals(Object obj)
Tests another object for equality with this object.
Paint getFillPaint()
Returns the fill paint.
Paint getHighlightPaint()
Returns the highlight paint.
Paint getOutlinePaint()
Returns the outline paint.
Stroke getOutlineStroke()
Returns the outline stroke.
double getRotateX()
Returns the scalar used for determining the rotation x value.
double getRotateY()
Returns the scalar used for determining the rotation y value.
int getSize()
Returns the size.
AffineTransform getTransform()
Returns the transform.
int hashCode()
Returns a hash code for this instance.
void setFillPaint(Paint p)
Sets the fill paint.
void setHighlightPaint(Paint p)
Sets the highlight paint.
void setOutlinePaint(Paint p)
Sets the outline paint.
void setOutlineStroke(Stroke s)
Sets the outline stroke.
void setRotateX(double x)
Sets the rotateX value.
void setRotateY(double y)
Sets the rotateY value.
void setSize(int pixels)
Sets the size.
Protected Methods
void defaultDisplay(Graphics2D g2, Shape shape)
Displays a shape.
abstract void drawNeedle(Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle)
Draws the needle.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected static AffineTransform transform

A transform.

Public Constructors

public MeterNeedle ()

Creates a new needle.

public MeterNeedle (Paint outline, Paint fill, Paint highlight)

Creates a new needle.

Parameters
outline the outline paint (null permitted).
fill the fill paint (null permitted).
highlight the highlight paint (null permitted).

Public Methods

public void draw (Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle)

Draws the needle.

Parameters
g2 the graphics device.
plotArea the plot area.
rotate the rotation point.
angle the angle.

public void draw (Graphics2D g2, Rectangle2D plotArea, double angle)

Draws the needle.

Parameters
g2 the graphics device.
plotArea the plot area.
angle the angle.

public void draw (Graphics2D g2, Rectangle2D plotArea)

Draws the needle.

Parameters
g2 the graphics device.
plotArea the plot area.

public boolean equals (Object obj)

Tests another object for equality with this object.

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

public Paint getFillPaint ()

Returns the fill paint.

Returns
  • The fill paint.

public Paint getHighlightPaint ()

Returns the highlight paint.

Returns
  • The highlight paint.

public Paint getOutlinePaint ()

Returns the outline paint.

Returns
  • The outline paint.

public Stroke getOutlineStroke ()

Returns the outline stroke.

Returns
  • The outline stroke.

public double getRotateX ()

Returns the scalar used for determining the rotation x value.

Returns
  • The x rotate scalar.

public double getRotateY ()

Returns the scalar used for determining the rotation y value.

Returns
  • The y rotate scalar.

public int getSize ()

Returns the size.

Returns
  • The size.

public AffineTransform getTransform ()

Returns the transform.

Returns
  • The transform.

public int hashCode ()

Returns a hash code for this instance.

Returns
  • A hash code.

public void setFillPaint (Paint p)

Sets the fill paint.

Parameters
p the fill paint.

public void setHighlightPaint (Paint p)

Sets the highlight paint.

Parameters
p the highlight paint.

public void setOutlinePaint (Paint p)

Sets the outline paint.

Parameters
p the new paint.

public void setOutlineStroke (Stroke s)

Sets the outline stroke.

Parameters
s the new stroke.

public void setRotateX (double x)

Sets the rotateX value.

Parameters
x the new value.

public void setRotateY (double y)

Sets the rotateY value.

Parameters
y the new value.

public void setSize (int pixels)

Sets the size.

Parameters
pixels the new size.

Protected Methods

protected void defaultDisplay (Graphics2D g2, Shape shape)

Displays a shape.

Parameters
g2 the graphics device.
shape the shape.

protected abstract void drawNeedle (Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle)

Draws the needle.

Parameters
g2 the graphics device.
plotArea the plot area.
rotate the rotation point.
angle the angle.