org.jfree.chart.plot.dial
public class StandardDialScale extends AbstractDialLayer implements DialScale, Cloneable, PublicCloneable, Serializable
Since: 1.0.7
Constructor Summary | |
---|---|
StandardDialScale()
Creates a new instance of DialScale. | |
StandardDialScale(double lowerBound, double upperBound, double startAngle, double extent, double majorTickIncrement, int minorTickCount)
Creates a new instance.
|
Method Summary | |
---|---|
double | angleToValue(double angle)
Converts the given angle to a data value, based on this scale.
|
Object | clone()
Returns a clone of this instance.
|
void | draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the scale on the dial plot.
|
boolean | equals(Object obj)
Tests this StandardDialScale for equality with an arbitrary
object.
|
double | getExtent()
Returns the extent.
|
boolean | getFirstTickLabelVisible()
Returns a flag that controls whether or not the first tick label is
visible.
|
double | getLowerBound()
Returns the lower bound for the scale.
|
double | getMajorTickIncrement()
Returns the increment (in data units) between major tick labels.
|
double | getMajorTickLength()
Returns the length factor for the major tick marks. |
Paint | getMajorTickPaint()
Returns the major tick paint.
|
Stroke | getMajorTickStroke()
Returns the stroke used to draw the major tick marks.
|
int | getMinorTickCount()
Returns the number of minor tick marks between major tick marks.
|
double | getMinorTickLength()
Returns the length factor for the minor tick marks. |
Paint | getMinorTickPaint()
Returns the paint used to draw the minor tick marks.
|
Stroke | getMinorTickStroke()
Returns the stroke used to draw the minor tick marks.
|
double | getStartAngle()
Returns the start angle for the scale (in degrees using the same
orientation as Java's Arc2D class).
|
Font | getTickLabelFont()
Returns the font used to draw the tick labels.
|
NumberFormat | getTickLabelFormatter()
Returns the number formatter used to convert the tick label values to
strings.
|
double | getTickLabelOffset()
Returns the tick label offset.
|
Paint | getTickLabelPaint()
Returns the paint used to draw the tick labels.
|
boolean | getTickLabelsVisible()
Returns true if the tick labels should be displayed,
and false otherwise.
|
double | getTickRadius()
Returns the radius (as a percentage of the maximum space available) of
the outer limit of the tick marks.
|
double | getUpperBound()
Returns the upper bound for the scale.
|
int | hashCode()
Returns a hash code for this instance.
|
boolean | isClippedToWindow()
Returns true to indicate that this layer should be
clipped within the dial window.
|
void | setExtent(double extent)
Sets the extent and sends a DialLayerChangeEvent to all
registered listeners.
|
void | setFirstTickLabelVisible(boolean visible)
Sets a flag that controls whether or not the first tick label is
visible, and sends a DialLayerChangeEvent to all registered
listeners.
|
void | setLowerBound(double lower)
Sets the lower bound for the scale and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setMajorTickIncrement(double increment)
Sets the increment (in data units) between major tick labels and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setMajorTickLength(double length)
Sets the length factor for the major tick marks and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setMajorTickPaint(Paint paint)
Sets the major tick paint and sends a DialLayerChangeEvent to
all registered listeners.
|
void | setMajorTickStroke(Stroke stroke)
Sets the stroke used to draw the major tick marks and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setMinorTickCount(int count)
Sets the number of minor tick marks between major tick marks and sends
a DialLayerChangeEvent to all registered listeners.
|
void | setMinorTickLength(double length)
Sets the length factor for the minor tick marks and sends
a DialLayerChangeEvent to all registered listeners.
|
void | setMinorTickPaint(Paint paint)
Sets the paint used to draw the minor tick marks and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setMinorTickStroke(Stroke stroke)
Sets the stroke used to draw the minor tick marks and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setStartAngle(double angle)
Sets the start angle for the scale and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setTickLabelFont(Font font)
Sets the font used to display the tick labels and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setTickLabelFormatter(NumberFormat formatter)
Sets the number formatter used to convert the tick label values to
strings, and sends a DialLayerChangeEvent to all registered
listeners.
|
void | setTickLabelOffset(double offset)
Sets the tick label offset and sends a DialLayerChangeEvent to
all registered listeners.
|
void | setTickLabelPaint(Paint paint)
Sets the paint used to draw the tick labels and sends a
DialLayerChangeEvent to all registered listeners.
|
void | setTickLabelsVisible(boolean visible)
Sets the flag that controls whether or not the tick labels are
displayed, and sends a DialLayerChangeEvent to all registered
listeners.
|
void | setTickRadius(double radius)
Sets the tick radius and sends a DialLayerChangeEvent to all
registered listeners.
|
void | setUpperBound(double upper)
Sets the upper bound for the scale and sends a
DialLayerChangeEvent to all registered listeners.
|
double | valueToAngle(double value)
Converts a data value to an angle against this scale.
|
Parameters: lowerBound the lower bound of the scale. upperBound the upper bound of the scale. startAngle the start angle (in degrees, using the same
orientation as Java's Arc2D
class). extent the extent (in degrees, counter-clockwise). majorTickIncrement the interval between major tick marks minorTickCount the number of minor ticks between major tick
marks.
Parameters: angle the angle.
Returns: The data value.
See Also: StandardDialScale
Returns: A clone.
Throws: CloneNotSupportedException if this instance is not cloneable.
Parameters: g2 the graphics target (null
not permitted). plot the dial plot (null
not permitted). frame the reference frame that is used to construct the
geometry of the plot (null
not permitted). view the visible part of the plot (null
not
permitted).
StandardDialScale
for equality with an arbitrary
object.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The extent.
See Also: StandardDialScale
Returns: A boolean.
See Also: StandardDialScale
Returns: The lower bound for the scale.
Since: 1.0.8
Returns: The increment between major tick labels.
See Also: StandardDialScale
Returns: The length factor.
See Also: StandardDialScale
Returns: The major tick paint (never null
).
See Also: setMajorTickPaint
Returns: The stroke (never null
).
See Also: setMajorTickStroke
Returns: The number of minor tick marks between major tick marks.
See Also: StandardDialScale
Returns: The length factor.
See Also: StandardDialScale
Returns: The paint (never null
).
See Also: setMinorTickPaint
Returns: The paint (never null
).
Since: 1.0.8
Arc2D
class).
Returns: The start angle.
See Also: StandardDialScale
Returns: The font (never null
).
See Also: setTickLabelFont
Returns: The formatter (never null
).
See Also: setTickLabelFormatter
Returns: The tick label offset.
See Also: StandardDialScale
Returns: The paint (null
not permitted).
See Also: setTickLabelPaint
true
if the tick labels should be displayed,
and false
otherwise.
Returns: A boolean.
See Also: StandardDialScale
Returns: The tick radius.
See Also: StandardDialScale
Returns: The upper bound for the scale.
Since: 1.0.8
Returns: A hash code.
true
to indicate that this layer should be
clipped within the dial window.
Returns: true
.
Parameters: extent the extent.
See Also: getExtent
Parameters: visible the new flag value.
See Also: getFirstTickLabelVisible
Parameters: lower the lower bound.
Since: 1.0.8
Parameters: increment the increment.
See Also: getMajorTickIncrement
Parameters: length the length.
See Also: getMajorTickLength
Parameters: paint the paint (null
not permitted).
See Also: getMajorTickPaint
Parameters: stroke the stroke (null
not permitted).
See Also: getMajorTickStroke
Parameters: count the count.
See Also: getMinorTickCount
Parameters: length the length.
See Also: getMinorTickLength
Parameters: paint the paint (null
not permitted).
See Also: getMinorTickPaint
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.8
Parameters: angle the angle (in degrees).
See Also: getStartAngle
Parameters: font the font (null
not permitted).
See Also: getTickLabelFont
Parameters: formatter the formatter (null
not permitted).
See Also: getTickLabelFormatter
Parameters: offset the offset.
See Also: getTickLabelOffset
Parameters: paint the paint (null
not permitted).
Parameters: visible the new flag value.
See Also: getTickLabelsVisible
Parameters: radius the radius.
See Also: getTickRadius
Parameters: upper the upper bound.
Since: 1.0.8
Parameters: value the data value.
Returns: The angle (in degrees, using the same specification as Java's Arc2D class).
See Also: StandardDialScale