| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jfree.chart.plot.dial.AbstractDialLayerorg.jfree.chart.plot.dial.StandardDialScalepublic class StandardDialScaleextends AbstractDialLayerimplements DialScale, Cloneable, PublicCloneable, SerializableDialPlot.
Constructor Summary | |
| |
| |
Method Summary | |
double |
|
Object |
|
void | |
boolean |
|
double |
|
boolean |
|
double |
|
double |
|
double |
|
Paint |
|
Stroke |
|
int |
|
double |
|
Paint |
|
Stroke |
|
double |
|
Font |
|
NumberFormat |
|
double |
|
Paint |
|
boolean |
|
double |
|
double |
|
int |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
double |
|
Methods inherited from class org.jfree.chart.plot.dial.AbstractDialLayer | |
addChangeListener, clone, equals, hasListener, hashCode, isVisible, notifyListeners, removeChangeListener, setVisible | |
public StandardDialScale(double lowerBound, double upperBound, double startAngle, double extent, double majorTickIncrement, int minorTickCount)
Creates a new instance.
- 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'sArc2Dclass).extent- the extent (in degrees, counter-clockwise).majorTickIncrement- the interval between major tick marksminorTickCount- the number of minor ticks between major tick marks.
public double angleToValue(double angle)
Converts the given angle to a data value, based on this scale.
- Specified by:
- angleToValue in interface DialScale
- Parameters:
angle- the angle.
- Returns:
- The data value.
- See Also:
valueToAngle(double)
public Object clone() throws CloneNotSupportedException
Returns a clone of this instance.
- Overrides:
- clone in interface AbstractDialLayer
- Returns:
- A clone.
public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
Draws the scale on the dial plot.
- Parameters:
g2- the graphics target (nullnot permitted).plot- the dial plot (nullnot permitted).frame- the reference frame that is used to construct the geometry of the plot (nullnot permitted).view- the visible part of the plot (nullnot permitted).
public boolean equals(Object obj)
Tests thisStandardDialScalefor equality with an arbitrary object.
- Overrides:
- equals in interface AbstractDialLayer
- Parameters:
obj- the object (nullpermitted).
- Returns:
- A boolean.
public double getExtent()
Returns the extent.
- Returns:
- The extent.
- See Also:
setExtent(double)
public boolean getFirstTickLabelVisible()
Returns a flag that controls whether or not the first tick label is visible.
- Returns:
- A boolean.
- See Also:
setFirstTickLabelVisible(boolean)
public double getLowerBound()
Returns the lower bound for the scale.
- Returns:
- The lower bound for the scale.
- Since:
- 1.0.8
- See Also:
setLowerBound(double)
public double getMajorTickIncrement()
Returns the increment (in data units) between major tick labels.
- Returns:
- The increment between major tick labels.
- See Also:
setMajorTickIncrement(double)
public double getMajorTickLength()
Returns the length factor for the major tick marks. The value is subtracted from the tick radius to determine the inner starting point for the tick marks.
- Returns:
- The length factor.
- See Also:
setMajorTickLength(double)
public Paint getMajorTickPaint()
Returns the major tick paint.
- Returns:
- The major tick paint (never
null).
- See Also:
setMajorTickPaint(Paint)
public Stroke getMajorTickStroke()
Returns the stroke used to draw the major tick marks.
- Returns:
- The stroke (never
null).
- See Also:
setMajorTickStroke(Stroke)
public int getMinorTickCount()
Returns the number of minor tick marks between major tick marks.
- Returns:
- The number of minor tick marks between major tick marks.
- See Also:
setMinorTickCount(int)
public double getMinorTickLength()
Returns the length factor for the minor tick marks. The value is subtracted from the tick radius to determine the inner starting point for the tick marks.
- Returns:
- The length factor.
- See Also:
setMinorTickLength(double)
public Paint getMinorTickPaint()
Returns the paint used to draw the minor tick marks.
- Returns:
- The paint (never
null).
- See Also:
setMinorTickPaint(Paint)
public Stroke getMinorTickStroke()
Returns the stroke used to draw the minor tick marks.
- Returns:
- The paint (never
null).
- Since:
- 1.0.8
- See Also:
setMinorTickStroke(Stroke)
public double getStartAngle()
Returns the start angle for the scale (in degrees using the same orientation as Java'sArc2Dclass).
- Returns:
- The start angle.
- See Also:
setStartAngle(double)
public Font getTickLabelFont()
Returns the font used to draw the tick labels.
- Returns:
- The font (never
null).
- See Also:
setTickLabelFont(Font)
public NumberFormat getTickLabelFormatter()
Returns the number formatter used to convert the tick label values to strings.
- Returns:
- The formatter (never
null).
- See Also:
setTickLabelFormatter(NumberFormat)
public double getTickLabelOffset()
Returns the tick label offset.
- Returns:
- The tick label offset.
- See Also:
setTickLabelOffset(double)
public Paint getTickLabelPaint()
Returns the paint used to draw the tick labels.
- Returns:
- The paint (
nullnot permitted).
- See Also:
setTickLabelPaint(Paint)
public boolean getTickLabelsVisible()
Returnstrueif the tick labels should be displayed, andfalseotherwise.
- Returns:
- A boolean.
- See Also:
setTickLabelsVisible(boolean)
public double getTickRadius()
Returns the radius (as a percentage of the maximum space available) of the outer limit of the tick marks.
- Returns:
- The tick radius.
- See Also:
setTickRadius(double)
public double getUpperBound()
Returns the upper bound for the scale.
- Returns:
- The upper bound for the scale.
- Since:
- 1.0.8
- See Also:
setUpperBound(double)
public int hashCode()
Returns a hash code for this instance.
- Overrides:
- hashCode in interface AbstractDialLayer
- Returns:
- A hash code.
public boolean isClippedToWindow()
Returnstrueto indicate that this layer should be clipped within the dial window.
- Specified by:
- isClippedToWindow in interface DialLayer
- Returns:
true.
public void setExtent(double extent)
Sets the extent and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
extent- the extent.
- See Also:
getExtent()
public void setFirstTickLabelVisible(boolean visible)
Sets a flag that controls whether or not the first tick label is visible, and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
visible- the new flag value.
- See Also:
getFirstTickLabelVisible()
public void setLowerBound(double lower)
Sets the lower bound for the scale and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
lower- the lower bound.
- Since:
- 1.0.8
- See Also:
getLowerBound()
public void setMajorTickIncrement(double increment)
Sets the increment (in data units) between major tick labels and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
increment- the increment.
- See Also:
getMajorTickIncrement()
public void setMajorTickLength(double length)
Sets the length factor for the major tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
length- the length.
- See Also:
getMajorTickLength()
public void setMajorTickPaint(Paint paint)
Sets the major tick paint and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
paint- the paint (nullnot permitted).
- See Also:
getMajorTickPaint()
public void setMajorTickStroke(Stroke stroke)
Sets the stroke used to draw the major tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
stroke- the stroke (nullnot permitted).
- See Also:
getMajorTickStroke()
public void setMinorTickCount(int count)
Sets the number of minor tick marks between major tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
count- the count.
- See Also:
getMinorTickCount()
public void setMinorTickLength(double length)
Sets the length factor for the minor tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
length- the length.
- See Also:
getMinorTickLength()
public void setMinorTickPaint(Paint paint)
Sets the paint used to draw the minor tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
paint- the paint (nullnot permitted).
- See Also:
getMinorTickPaint()
public void setMinorTickStroke(Stroke stroke)
Sets the stroke used to draw the minor tick marks and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
stroke- the stroke (nullnot permitted).
- Since:
- 1.0.8
- See Also:
getMinorTickStroke()
public void setStartAngle(double angle)
Sets the start angle for the scale and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
angle- the angle (in degrees).
- See Also:
getStartAngle()
public void setTickLabelFont(Font font)
Sets the font used to display the tick labels and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
font- the font (nullnot permitted).
- See Also:
getTickLabelFont()
public void setTickLabelFormatter(NumberFormat formatter)
Sets the number formatter used to convert the tick label values to strings, and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
formatter- the formatter (nullnot permitted).
- See Also:
getTickLabelFormatter()
public void setTickLabelOffset(double offset)
Sets the tick label offset and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
offset- the offset.
- See Also:
getTickLabelOffset()
public void setTickLabelPaint(Paint paint)
Sets the paint used to draw the tick labels and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
paint- the paint (nullnot permitted).
public void setTickLabelsVisible(boolean visible)
Sets the flag that controls whether or not the tick labels are displayed, and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
visible- the new flag value.
- See Also:
getTickLabelsVisible()
public void setTickRadius(double radius)
Sets the tick radius and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
radius- the radius.
- See Also:
getTickRadius()
public void setUpperBound(double upper)
Sets the upper bound for the scale and sends aDialLayerChangeEventto all registered listeners.
- Parameters:
upper- the upper bound.
- Since:
- 1.0.8
- See Also:
getUpperBound()
public double valueToAngle(double value)
Converts a data value to an angle against this scale.
- Specified by:
- valueToAngle in interface DialScale
- Parameters:
value- the data value.
- Returns:
- The angle (in degrees, using the same specification as Java's Arc2D class).
- See Also:
angleToValue(double)