- java.lang.Object
-
- org.jfree.chart.plot.dial.AbstractDialLayer
-
- org.jfree.chart.plot.dial.StandardDialFrame
-
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable,DialFrame,DialLayer
public class StandardDialFrame extends AbstractDialLayer implements DialFrame, Cloneable, PublicCloneable, Serializable
A simple circular frame for theDialPlotclass.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StandardDialFrame()Creates a new instance ofStandardDialFrame.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()Returnsfalseto 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.voidsetForegroundPaint(Paint paint)Sets the foreground paint and sends aDialLayerChangeEventto all registered listeners.voidsetRadius(double radius)Sets the radius and sends aDialLayerChangeEventto all registered listeners.voidsetStroke(Stroke stroke)Sets the stroke and sends aDialLayerChangeEventto all registered listeners.-
Methods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer
addChangeListener, hasListener, isVisible, notifyListeners, removeChangeListener, setVisible
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.chart.plot.dial.DialLayer
addChangeListener, hasListener, isVisible, removeChangeListener
-
-
-
-
Constructor Detail
-
StandardDialFrame
public StandardDialFrame()
Creates a new instance ofStandardDialFrame.
-
-
Method Detail
-
getRadius
public double getRadius()
Returns the radius, relative to the framing rectangle.- Returns:
- The radius.
- See Also:
setRadius(double)
-
setRadius
public void setRadius(double radius)
Sets the radius and sends aDialLayerChangeEventto all registered listeners.- Parameters:
radius- the radius (must be positive).- See Also:
getRadius()
-
getBackgroundPaint
public Paint getBackgroundPaint()
Returns the background paint.- Returns:
- The background paint (never
null). - See Also:
setBackgroundPaint(Paint)
-
setBackgroundPaint
public void setBackgroundPaint(Paint paint)
Sets the background paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
getBackgroundPaint()
-
getForegroundPaint
public Paint getForegroundPaint()
Returns the foreground paint.- Returns:
- The foreground paint (never
null). - See Also:
setForegroundPaint(Paint)
-
setForegroundPaint
public void setForegroundPaint(Paint paint)
Sets the foreground paint and sends aDialLayerChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).- See Also:
getForegroundPaint()
-
getStroke
public Stroke getStroke()
Returns the stroke for the frame.- Returns:
- The stroke (never
null). - See Also:
setStroke(Stroke)
-
setStroke
public void setStroke(Stroke stroke)
Sets the stroke and sends aDialLayerChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot permitted).- See Also:
getStroke()
-
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.
-
isClippedToWindow
public boolean isClippedToWindow()
Returnsfalseto indicate that this dial layer is not clipped to the dial window.- Specified by:
isClippedToWindowin interfaceDialLayer- Returns:
- A boolean.
-
draw
public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the frame. This method is called by theDialPlotclass, you shouldn't need to call it directly.
-
equals
public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractDialLayer- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classAbstractDialLayer- Returns:
- The hash code.
-
clone
public Object clone() throws CloneNotSupportedException
Returns a clone of this instance.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDialLayer- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if any of the frame's attributes cannot be cloned.
-
-