Class MeterNeedle
java.lang.Object
org.jfree.chart.needle.MeterNeedle
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArrowNeedle,LineNeedle,LongNeedle,MiddlePinNeedle,PinNeedle,PlumNeedle,PointerNeedle,ShipNeedle
The base class used to represent the needle on a
CompassPlot.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new needle.MeterNeedle(Paint outline, Paint fill, Paint highlight) Creates a new needle. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddefaultDisplay(Graphics2D g2, Shape shape) Displays a shape.voiddraw(Graphics2D g2, Rectangle2D plotArea) Draws the needle.voiddraw(Graphics2D g2, Rectangle2D plotArea, double angle) Draws the needle.voiddraw(Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle) Draws the needle.protected abstract voiddrawNeedle(Graphics2D g2, Rectangle2D plotArea, Point2D rotate, double angle) Draws the needle.booleanTests another object for equality with this object.Returns the fill paint.Returns the highlight paint.Returns the outline paint.Returns the outline stroke.doubleReturns the scalar used for determining the rotation x value.doubleReturns the scalar used for determining the rotation y value.intgetSize()Returns the size.Returns the transform.inthashCode()Returns a hash code for this instance.voidSets the fill paint.voidSets the highlight paint.voidSets the outline paint.voidSets the outline stroke.voidsetRotateX(double x) Sets the rotateX value.voidsetRotateY(double y) Sets the rotateY value.voidsetSize(int pixels) Sets the size.
-
Field Details
-
transform
A transform.
-
-
Constructor Details
-
MeterNeedle
public MeterNeedle()Creates a new needle. -
MeterNeedle
Creates a new needle.- Parameters:
outline- the outline paint (nullpermitted).fill- the fill paint (nullpermitted).highlight- the highlight paint (nullpermitted).
-
-
Method Details
-
getOutlinePaint
-
setOutlinePaint
-
getOutlineStroke
-
setOutlineStroke
-
getFillPaint
-
setFillPaint
-
getHighlightPaint
-
setHighlightPaint
Sets the highlight paint.- Parameters:
p- the highlight paint.
-
getRotateX
Returns the scalar used for determining the rotation x value.- Returns:
- The x rotate scalar.
-
setRotateX
-
setRotateY
-
getRotateY
Returns the scalar used for determining the rotation y value.- Returns:
- The y rotate scalar.
-
draw
Draws the needle.- Parameters:
g2- the graphics device.plotArea- the plot area.
-
draw
Draws the needle.- Parameters:
g2- the graphics device.plotArea- the plot area.angle- the angle.
-
draw
Draws the needle.- Parameters:
g2- the graphics device.plotArea- the plot area.rotate- the rotation point.angle- the angle.
-
drawNeedle
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.
-
defaultDisplay
Displays a shape.- Parameters:
g2- the graphics device.shape- the shape.
-
getSize
-
setSize
-
getTransform
-
equals
-
hashCode
-