org.jfree.chart.plot.dial

Class StandardDialFrame

public class StandardDialFrame extends AbstractDialLayer implements DialFrame, Cloneable, PublicCloneable, Serializable

A simple circular frame for the DialPlot class.

Since: 1.0.7

Constructor Summary
StandardDialFrame()
Creates a new instance of StandardDialFrame.
Method Summary
Objectclone()
Returns a clone of this instance.
voiddraw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the frame.
booleanequals(Object obj)
Tests this instance for equality with an arbitrary object.
PaintgetBackgroundPaint()
Returns the background paint.
PaintgetForegroundPaint()
Returns the foreground paint.
doublegetRadius()
Returns the radius, relative to the framing rectangle.
StrokegetStroke()
Returns the stroke for the frame.
ShapegetWindow(Rectangle2D frame)
Returns the shape for the window for this dial.
inthashCode()
Returns a hash code for this instance.
booleanisClippedToWindow()
Returns false to indicate that this dial layer is not clipped to the dial window.
voidsetBackgroundPaint(Paint paint)
Sets the background paint and sends a DialLayerChangeEvent to all registered listeners.
voidsetForegroundPaint(Paint paint)
Sets the foreground paint and sends a DialLayerChangeEvent to all registered listeners.
voidsetRadius(double radius)
Sets the radius and sends a DialLayerChangeEvent to all registered listeners.
voidsetStroke(Stroke stroke)
Sets the stroke and sends a DialLayerChangeEvent to all registered listeners.

Constructor Detail

StandardDialFrame

public StandardDialFrame()
Creates a new instance of StandardDialFrame.

Method Detail

clone

public Object clone()
Returns a clone of this instance.

Returns: A clone.

Throws: CloneNotSupportedException if any of the frame's attributes cannot be cloned.

draw

public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the frame. This method is called by the DialPlot class, you shouldn't need to call it directly.

Parameters: g2 the graphics target (null not permitted). plot the plot (null not permitted). frame the frame (null not permitted). view the view (null not permitted).

equals

public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

getBackgroundPaint

public Paint getBackgroundPaint()
Returns the background paint.

Returns: The background paint (never null).

See Also: setBackgroundPaint

getForegroundPaint

public Paint getForegroundPaint()
Returns the foreground paint.

Returns: The foreground paint (never null).

See Also: setForegroundPaint

getRadius

public double getRadius()
Returns the radius, relative to the framing rectangle.

Returns: The radius.

See Also: StandardDialFrame

getStroke

public Stroke getStroke()
Returns the stroke for the frame.

Returns: The stroke (never null).

See Also: setStroke

getWindow

public Shape getWindow(Rectangle2D frame)
Returns the shape for the window for this dial. Some dial layers will request that their drawing be clipped within this window.

Parameters: frame the reference frame (null not permitted).

Returns: The shape of the dial's window.

hashCode

public int hashCode()
Returns a hash code for this instance.

Returns: The hash code.

isClippedToWindow

public boolean isClippedToWindow()
Returns false to indicate that this dial layer is not clipped to the dial window.

Returns: A boolean.

setBackgroundPaint

public void setBackgroundPaint(Paint paint)
Sets the background paint and sends a DialLayerChangeEvent to all registered listeners.

Parameters: paint the paint (null not permitted).

See Also: getBackgroundPaint

setForegroundPaint

public void setForegroundPaint(Paint paint)
Sets the foreground paint and sends a DialLayerChangeEvent to all registered listeners.

Parameters: paint the paint (null not permitted).

See Also: getForegroundPaint

setRadius

public void setRadius(double radius)
Sets the radius and sends a DialLayerChangeEvent to all registered listeners.

Parameters: radius the radius (must be positive).

See Also: getRadius

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

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.