org.jfree.chart.plot.dial

Class ArcDialFrame

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

A standard frame for the DialPlot class.

Since: 1.0.7

Constructor Summary
ArcDialFrame()
Creates a new instance of ArcDialFrame that spans 180 degrees.
ArcDialFrame(double startAngle, double extent)
Creates a new instance of ArcDialFrame that spans the arc specified.
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 (never null).
doublegetExtent()
Returns the extent.
PaintgetForegroundPaint()
Returns the foreground paint.
doublegetInnerRadius()
Returns the inner radius, relative to the framing rectangle.
doublegetOuterRadius()
Returns the outer radius, relative to the framing rectangle.
protected ShapegetOuterWindow(Rectangle2D frame)
Returns the outer window.
doublegetStartAngle()
Returns the start angle.
StrokegetStroke()
Returns the stroke.
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.
voidsetExtent(double extent)
Sets the extent and sends a DialLayerChangeEvent to all registered listeners.
voidsetForegroundPaint(Paint paint)
Sets the foreground paint and sends a DialLayerChangeEvent to all registered listeners.
voidsetInnerRadius(double radius)
Sets the inner radius and sends a DialLayerChangeEvent to all registered listeners.
voidsetOuterRadius(double radius)
Sets the outer radius and sends a DialLayerChangeEvent to all registered listeners.
voidsetStartAngle(double angle)
Sets the start angle and sends a DialLayerChangeEvent to all registered listeners.
voidsetStroke(Stroke stroke)
Sets the stroke and sends a DialLayerChangeEvent to all registered listeners.

Constructor Detail

ArcDialFrame

public ArcDialFrame()
Creates a new instance of ArcDialFrame that spans 180 degrees.

ArcDialFrame

public ArcDialFrame(double startAngle, double extent)
Creates a new instance of ArcDialFrame that spans the arc specified.

Parameters: startAngle the startAngle (in degrees). extent the extent of the arc (in degrees, counter-clockwise).

Method Detail

clone

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

Returns: A clone.

Throws: CloneNotSupportedException if any attribute of this instance cannot be cloned.

draw

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

Parameters: g2 the graphics target. plot the plot. frame the dial's reference frame. view the dial's view rectangle.

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 (never null).

Returns: The background paint.

See Also: setBackgroundPaint

getExtent

public double getExtent()
Returns the extent.

Returns: The extent.

See Also: ArcDialFrame

getForegroundPaint

public Paint getForegroundPaint()
Returns the foreground paint.

Returns: The foreground paint (never null).

See Also: setForegroundPaint

getInnerRadius

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

Returns: The inner radius.

See Also: ArcDialFrame

getOuterRadius

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

Returns: The outer radius.

See Also: ArcDialFrame

getOuterWindow

protected Shape getOuterWindow(Rectangle2D frame)
Returns the outer window.

Parameters: frame the frame.

Returns: The outer window.

getStartAngle

public double getStartAngle()
Returns the start angle.

Returns: The start angle.

See Also: ArcDialFrame

getStroke

public Stroke getStroke()
Returns the stroke.

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: false.

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

setExtent

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

Parameters: extent the extent.

See Also: getExtent

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

setInnerRadius

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

Parameters: radius the inner radius.

See Also: getInnerRadius

setOuterRadius

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

Parameters: radius the outer radius.

See Also: getOuterRadius

setStartAngle

public void setStartAngle(double angle)
Sets the start angle and sends a DialLayerChangeEvent to all registered listeners.

Parameters: angle the angle.

See Also: getStartAngle

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.