Package org.jfree.chart.plot.dial
Class ArcDialFrame
java.lang.Object
org.jfree.chart.plot.dial.AbstractDialLayer
org.jfree.chart.plot.dial.ArcDialFrame
- All Implemented Interfaces:
Serializable,Cloneable,DialFrame,DialLayer,PublicCloneable
public class ArcDialFrame
extends AbstractDialLayer
implements DialFrame, Cloneable, PublicCloneable, Serializable
A standard frame for the
DialPlot class.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofArcDialFramethat spans 180 degrees.ArcDialFrame(double startAngle, double extent) Creates a new instance ofArcDialFramethat spans the arc specified. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone of this instance.voiddraw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view) Draws the frame.booleanTests this instance for equality with an arbitrary object.Returns the background paint (nevernull).doubleReturns the extent.Returns the foreground paint.doubleReturns the inner radius, relative to the framing rectangle.doubleReturns the outer radius, relative to the framing rectangle.protected ShapegetOuterWindow(Rectangle2D frame) Returns the outer window.doubleReturns the start angle.Returns the stroke.getWindow(Rectangle2D frame) Returns the shape for the window for this dial.inthashCode()Returns a hash code for this instance.booleanReturnsfalseto indicate that this dial layer is not clipped to the dial window.voidsetBackgroundPaint(Paint paint) Sets the background paint and sends aDialLayerChangeEventto all registered listeners.voidsetExtent(double extent) Sets the extent and sends aDialLayerChangeEventto all registered listeners.voidsetForegroundPaint(Paint paint) Sets the foreground paint and sends aDialLayerChangeEventto all registered listeners.voidsetInnerRadius(double radius) Sets the inner radius and sends aDialLayerChangeEventto all registered listeners.voidsetOuterRadius(double radius) Sets the outer radius and sends aDialLayerChangeEventto all registered listeners.voidsetStartAngle(double angle) Sets the start angle and sends aDialLayerChangeEventto all registered listeners.voidSets the stroke and sends aDialLayerChangeEventto all registered listeners.Methods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer
addChangeListener, hasListener, isVisible, notifyListeners, removeChangeListener, setVisibleMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart.plot.dial.DialLayer
addChangeListener, hasListener, isVisible, removeChangeListener
-
Constructor Details
-
ArcDialFrame
public ArcDialFrame()Creates a new instance ofArcDialFramethat spans 180 degrees. -
ArcDialFrame
Creates a new instance ofArcDialFramethat spans the arc specified.- Parameters:
startAngle- the startAngle (in degrees).extent- the extent of the arc (in degrees, counter-clockwise).
-
-
Method Details
-
getBackgroundPaint
Returns the background paint (nevernull).- Returns:
- The background paint.
- See Also:
-
setBackgroundPaint
Sets the background paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
-
getForegroundPaint
Returns the foreground paint.- Returns:
- The foreground paint (never
null). - See Also:
-
setForegroundPaint
Sets the foreground paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
-
getStroke
Returns the stroke.- Returns:
- The stroke (never
null). - See Also:
-
setStroke
Sets the stroke and sends aDialLayerChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot permitted).- See Also:
-
getInnerRadius
Returns the inner radius, relative to the framing rectangle.- Returns:
- The inner radius.
- See Also:
-
setInnerRadius
Sets the inner radius and sends aDialLayerChangeEventto all registered listeners.- Parameters:
radius- the inner radius.- See Also:
-
getOuterRadius
Returns the outer radius, relative to the framing rectangle.- Returns:
- The outer radius.
- See Also:
-
setOuterRadius
Sets the outer radius and sends aDialLayerChangeEventto all registered listeners.- Parameters:
radius- the outer radius.- See Also:
-
getStartAngle
Returns the start angle.- Returns:
- The start angle.
- See Also:
-
setStartAngle
Sets the start angle and sends aDialLayerChangeEventto all registered listeners.- Parameters:
angle- the angle.- See Also:
-
getExtent
Returns the extent.- Returns:
- The extent.
- See Also:
-
setExtent
Sets the extent and sends aDialLayerChangeEventto all registered listeners.- Parameters:
extent- the extent.- See Also:
-
getWindow
Returns the shape for the window for this dial. Some dial layers will request that their drawing be clipped within this window. -
getOuterWindow
Returns the outer window.- Parameters:
frame- the frame.- Returns:
- The outer window.
-
draw
Draws the frame. -
isClippedToWindow
Returnsfalseto indicate that this dial layer is not clipped to the dial window.- Specified by:
isClippedToWindowin interfaceDialLayer- Returns:
false.
-
equals
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractDialLayer- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
Returns a hash code for this instance.- Overrides:
hashCodein classAbstractDialLayer- Returns:
- The hash code.
-
clone
Returns a clone of this instance.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDialLayer- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if any attribute of this instance cannot be cloned.
-