com.jinsight.jetchart
Class Scale
java.lang.Object
com.jinsight.jetchart.Scale
- public class Scale
- extends java.lang.Object
This class implements the properties and methods of a chart scale. A scale
has no public constructor, and can only be accessed through 'get' methods
implemented in classes ScatterGraph, PolarGraph
and GraphSet.
- See Also:
ScatterGraph,
PolarGraph,
GraphSet
|
Field Summary |
static int |
BOTTOM
Constant used to place scale along the bottom horizontal axis. |
static int |
CENTER
Constant used to place scale centered along the vertical axis. |
static long |
DAY
Constant used to set the date increment to multiples of 01 day, in
a date graph. |
static int |
HOUR
Constant used to set the date increment to multiples of 01 hour, in
a date graph. |
static int |
INNER_LEFT
Constant used to place scale along the inner side of the left vertical axis. |
static int |
INNER_LEFT_RIGHT
Constant used to place scale along the inner sides of both left and right vertical axis. |
static int |
INNER_RIGHT
Constant used to place scale along the inner side of the right vertical axis. |
static int |
LEFT
Constant used to place scale along the left vertical axis. |
static int |
LEFT_RIGHT
Constant used to place scale along both left and right vertical axis. |
static int |
MINUTE
Constant used to set the date increment to multiples of 01 minute, in
a date graph. |
static double |
NAN
Constant used to disable the effect the methods setMinValue
and setMaxValue has on the calculation of the scale's
min and max values. |
static int |
RIGHT
Constant used to place scale along the right vertical axis. |
static int |
SECOND
Constant used to set the date increment to multiples of 01 second, in
a date graph. |
static int |
TOP
Constant used to place scale along the top horizontal axis. |
static int |
TOP_BOTTOM
Constant used to place scale along the top and bottom horizontal axis. |
|
Method Summary |
protected void |
finalize()
|
void |
setAutoAdjustmentEnabled(boolean isAutoAdjustmentEnabled)
Enables/disables automatic adjustment of the max and min scale values. |
void |
setAutoScaleEnabled(boolean isAutoScaleEnabled)
Enables/disables an automatic scale. |
void |
setBackground(java.awt.Color background)
Sets background color. |
void |
setColor(java.awt.Color color)
Sets the scale color. |
void |
setDateFormat(java.text.DateFormat dateFormat)
Sets the expected format style of the labels, start and end dates of a date/time
graph's scale. |
void |
setDateFormat(java.lang.String dateFormat)
Sets the expected format style of the labels, start and end dates of a date/time
graph's scale. |
void |
setDateLabels(java.lang.String[] dateLabels)
Customizes date labels. |
void |
setDateLabelsFormat(java.text.DateFormat dateFormat)
Sets the format style of the date labels displayed. |
void |
setDateLabelsFormat(java.lang.String dateFormat)
Sets the format style of the date labels displayed. |
void |
setDayOfMonthIncrement(int dayOfMonthIncrement)
Sets the day of a month increment. |
void |
setEndDate(java.lang.String endDate)
Sets the end date of this scale, as a date/time pattern string. |
void |
setEndPoint(float endPoint)
Sets scale end point. |
void |
setFont(java.awt.Font font)
Sets the scale font. |
void |
setHPolarEnabled(boolean isHPolarEnabled)
Enables/disables the horizontal scale on polar charts. |
void |
setHPosition(int hPosition)
Sets horizontal scale position. |
void |
setIncrement(double increment)
Sets the scale increment. |
void |
setInnerLogTicksCount(int innerLogTicksCount)
Sets the number of logarithmic inner ticks to be displayed. |
void |
setInnerLogTicksEnabled(boolean isInnerLogTicksEnabled)
Enables/disables display of inner ticks within two successive points of
a logarithmic scale. |
void |
setLabels(java.lang.String[] labels)
Sets the scale labels to be displayed, replacing the scale values,
which are automatically calculated. |
void |
setLabelsEnabled(boolean isLabelsEnabled)
Enables/disables display of scale labels. |
void |
setLogBase(int logBase)
Sets the logarithmic scale base. |
void |
setLogEnabled(boolean isLogEnabled)
Enables/disables a logarithmic scale. |
void |
setLogIncrementEnabled(boolean isLogIncrementEnabled)
Enables/disables display of logarithmic values on a logarithmic
scale. |
void |
setMarksColor(java.awt.Color marksColor)
Sets the color of the scale marks. |
void |
setMarksEnabled(boolean isMarksEnabled)
Enables/disables display of scale marks. |
void |
setMaxValue(double maxValue)
Sets the scale maximum value. |
void |
setMinValue(double minValue)
Sets the scale minimum value. |
void |
setMonthIncrementEnabled(boolean isMonthIncrementEnabled)
Enables/disables month increments in a date/time graph. |
void |
setMonthOfYearIncrement(int monthOfYearIncrement)
Sets the month of a year increment. |
void |
setOpacityEnabled(boolean isOpaque)
Enables/disables opacity. |
void |
setPosition(int position)
Deprecated. |
void |
setStartDate(java.lang.String startDate)
Sets the start date of this scale, as a date/time pattern string. |
void |
setStartPoint(float startPoint)
Sets a scale starting point. |
void |
setValueFormat(java.lang.String valueFormat)
Sets the format of values displayed along the scale. |
void |
setValuesEnabled(boolean isValuesEnabled)
Deprecated. |
void |
setVerticalLabelsEnabled(boolean isVerticalLabelsEnabled)
Sets scale labels orientation to horizontal or vertical. |
void |
setVisibleLabelsIndexes(int[] visibleLabelsIndexes)
Sets the indexes of the only scale labels to be displayed. |
void |
setVPolarEnabled(boolean isVPolarEnabled)
Enables/disables the vertical scale on polar charts. |
void |
setVPosition(int vPosition)
Sets vertical scale position. |
void |
setYearIncrementEnabled(boolean isYearIncrementEnabled)
Enables/disables year increments in a date/time graph. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LEFT
public static final int LEFT
- Constant used to place scale along the left vertical axis.
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- Constant used to place scale along the right vertical axis.
- See Also:
- Constant Field Values
LEFT_RIGHT
public static final int LEFT_RIGHT
- Constant used to place scale along both left and right vertical axis.
- See Also:
- Constant Field Values
INNER_LEFT
public static final int INNER_LEFT
- Constant used to place scale along the inner side of the left vertical axis.
- See Also:
- Constant Field Values
INNER_RIGHT
public static final int INNER_RIGHT
- Constant used to place scale along the inner side of the right vertical axis.
- See Also:
- Constant Field Values
INNER_LEFT_RIGHT
public static final int INNER_LEFT_RIGHT
- Constant used to place scale along the inner sides of both left and right vertical axis.
- See Also:
- Constant Field Values
CENTER
public static final int CENTER
- Constant used to place scale centered along the vertical axis. Only has
effect with polar charts.
- See Also:
- Constant Field Values
BOTTOM
public static final int BOTTOM
- Constant used to place scale along the bottom horizontal axis.
- See Also:
- Constant Field Values
TOP_BOTTOM
public static final int TOP_BOTTOM
- Constant used to place scale along the top and bottom horizontal axis.
- See Also:
- Constant Field Values
TOP
public static final int TOP
- Constant used to place scale along the top horizontal axis.
- See Also:
- Constant Field Values
SECOND
public static final int SECOND
- Constant used to set the date increment to multiples of 01 second, in
a date graph.
- See Also:
- Constant Field Values
MINUTE
public static final int MINUTE
- Constant used to set the date increment to multiples of 01 minute, in
a date graph.
- See Also:
- Constant Field Values
HOUR
public static final int HOUR
- Constant used to set the date increment to multiples of 01 hour, in
a date graph.
- See Also:
- Constant Field Values
DAY
public static final long DAY
- Constant used to set the date increment to multiples of 01 day, in
a date graph.
- See Also:
- Constant Field Values
NAN
public static final double NAN
- Constant used to disable the effect the methods
setMinValue
and setMaxValue has on the calculation of the scale's
min and max values.
- See Also:
- Constant Field Values
setDateLabelsFormat
public void setDateLabelsFormat(java.lang.String dateFormat)
- Sets the format style of the date labels displayed. The horizontal scale of
a date graph shows timestamps, and the format style can be changed passing
to this method a sequence of pattern characters, as specified for the class
java.text.SimpleDateFormat.
If the format style is not informed or null is passed, timestamps are
formatted using the SHORT style of the class java.text.DateFormat, for both
date and time.
This method only has effect if date graph is enabled and the format of date
labels has not been informed with the overloaded form that takes a DateFormat
object. It is only applicable to scatter charts.
- Parameters:
dateFormat - A String object.- See Also:
ScatterGraph.setDateGraphEnabled(boolean),
setDateLabels(java.lang.String[])
setDateLabelsFormat
public void setDateLabelsFormat(java.text.DateFormat dateFormat)
- Sets the format style of the date labels displayed. This method takes a
DateFormat object to specify the format style of timestamp labels
displayed by the horizontal scale of a date graph. It takes precedence over
similar method that takes a string pattern to specify the format style.
If a DateFormat object is not informed or null is passed, timestamps are
formatted using the DateFormat.SHORT style for both date and time.
This method only has effect if date graph is enabled, and is only applicable
to scatter charts.
- Parameters:
dateFormat - A String object.- See Also:
ScatterGraph.setDateGraphEnabled(boolean),
setDateLabels(java.lang.String[])
setDateFormat
public void setDateFormat(java.lang.String dateFormat)
- Sets the expected format style of the labels, start and end dates of a date/time
graph's scale. This method takes a user-defined date/time format string as a
sequence of pattern letters, as specified for the java.text.SimpleDateFormat class,
to parse timestamps into milliseconds, which are used to calculate the
positions of date labels, start and end dates within the horizontal scale range.
By default, the expected date format corresponds to the localized SHORT style of
class java.text.DateFormat for both date and time. A parsing exception is raised
if the labels and start/end dates format does not match the expected format style.
This method only has effect if date graph is enabled, and is only applicable to
scatter charts.
- Parameters:
dateFormat - A String object.- See Also:
setStartDate(java.lang.String),
setEndDate(java.lang.String),
setDateLabels(java.lang.String[])
setDateFormat
public void setDateFormat(java.text.DateFormat dateFormat)
- Sets the expected format style of the labels, start and end dates of a date/time
graph's scale. This method takes a DateFormat object to parse timestamps
into milliseconds, which are used to calculate the positions of date labels,
start and end dates within the scale range. It takes precedence over similar
method that takes a date/time pattern string.
The format style corresponds to the date/time constants provided by
the DateFormat class, as SHORT, MEDIUM, etc. The expected format is the one
provided by the DateFormat object taken by this method, or any format provided
by subclasses of DateFormat, as SimpleDateFormat, which implements the method
applyPattern(String pattern) to specify a more complex format.
By default, the expected date format corresponds to the localized SHORT style of
class java.text.DateFormat for both date and time. A parsing exception is raised
if the labels and start/end dates format do not match the expected format.
This method only has effect if date graph is enabled, and is only applicable to
scatter charts.
- Parameters:
dateFormat - A DateFormat object.- See Also:
setStartDate(java.lang.String),
setEndDate(java.lang.String),
setDateLabels(java.lang.String[])
setDateLabels
public void setDateLabels(java.lang.String[] dateLabels)
- Customizes date labels. The format of the customized date labels must match
the format style specified with either forms of the method
setDateFormat.
If the date format style is not specified the date labels are parsed using the
SHORT style of the java.text.DateFormat class, both for date and time.
A parsing exception is raised if the date labels format doesn't match the
expected format style.
This method only has effect if date graph is enabled and this scale is not
automatic. It is only applicable to scatter charts.
- Parameters:
dateLabels - An array of string objects- See Also:
setAutoScaleEnabled(boolean),
setDateFormat(java.lang.String)
setStartDate
public void setStartDate(java.lang.String startDate)
- Sets the start date of this scale, as a date/time pattern string. The start
date is parsed into a milliseconds value, which is used to calculate the start
date position within the horizontal scale range. If date graph is enabled and
a minimum scale value is informed with the method
setMinValue,
this value is replaced by the start date after the conversion to milliseconds.
The date format of the string taken by this method must be specified with
either forms of the method setDateFormat.
This method only has effect if a date graph is enabled, and is only applicable
to scatter charts.
A parsing exception is raised if the start date format doesn't match the
expected format style.
- Parameters:
startDate - A String object.- See Also:
ScatterGraph.setDateGraphEnabled(boolean),
setMinValue(double),
setAutoScaleEnabled(boolean),
setDateFormat(java.lang.String)
setEndDate
public void setEndDate(java.lang.String endDate)
- Sets the end date of this scale, as a date/time pattern string. The end date
is parsed into a milliseconds value, which is used to calculate the end date
position within the horizontal scale range. If date graph is enabled and a
maximum scale value is informed with the method
setMaxValue,
this value is replaced by the end date after the conversion to milliseconds.
The date format of the strings taken by this method must be specified with
either forms of the method setDateFormat.
This method only has effect if a date graph is enabled, and is only
applicable to scatter charts.
A parsing exception is raised if the end date format doesn't match the
expected format style.
- Parameters:
endDate - A String object.- See Also:
ScatterGraph.setDateGraphEnabled(boolean),
setMaxValue(double),
setAutoScaleEnabled(boolean),
setDateFormat(java.lang.String)
setMonthIncrementEnabled
public void setMonthIncrementEnabled(boolean isMonthIncrementEnabled)
- Enables/disables month increments in a date/time graph. If enabled, the only
scale labels displayed are those corresponding to a specific day of a month.
By default, the day of a month is 1, unlesss a different value is passed to the
method
setDayOfMonthIncrement.
For instance, a scale ranging from Sept 09, 2003 to Apr 10, 2004 displays the
labels corresponding to October 01,November 01,December 01 and so on, until
Apr 01, 2004 is reached.
This method only has effect if date graph is enabled and is only applicable
to scatter charts. Either an automatic or a manual scale supports this feature.
However, the labels of an automatic scale with month increments enabled might
overlap each other if the graph area is not large enough.
This method is also ignored if at least one of the following conditions is
observed, in priority order:
- The scale is not automatic and date labels are informed with the method
setDateLabels.
- A year increment is enabled with the method
setYearIncrementEnabled.
- Parameters:
isMonthIncrementEnabled - A boolean value(true/false).- See Also:
setDayOfMonthIncrement(int),
ScatterGraph.setDateGraphEnabled(boolean),
setDateLabels(java.lang.String[]),
setAutoScaleEnabled(boolean)
setDayOfMonthIncrement
public void setDayOfMonthIncrement(int dayOfMonthIncrement)
- Sets the day of a month increment. The only scale labels displayed are
those corresponding to this value. For instance, if the day is 4 and
a scale ranges from Sept 09,2003 to Apr 10,2004, the labels displayed
are Oct 04 2003, Nov 04 2003, Dec 04 2003 and so on, until Apr 04 2004 is
reached.
This method only has effect if date graph is enabled and month increment
is enabled. It is only applicable to scatter charts.
- Parameters:
dayOfMonthIncrement - An integer value equal to or greater than 1.- See Also:
setMonthIncrementEnabled(boolean),
ScatterGraph.setDateGraphEnabled(boolean)
setYearIncrementEnabled
public void setYearIncrementEnabled(boolean isYearIncrementEnabled)
- Enables/disables year increments in a date/time graph. If enabled, the only
scale labels displayed are those corresponding to a specific month. By default,
the month is 1(January), unless a different value is passed to the method
setMonthOfYearIncrement. For instance, a scale ranging from
Sept 09, 2003 to Apr 10, 2008 displays the labels corresponding to January 2004,
January 2005 and so on, until January 2008 is reached.
This method only has effect if date graph is enabled, and it is only applicable
to scatter charts. Either an automatic or a manual scale supports this feature.
However, the labels of an automatic scale with year increments enabled might
overlap each other if the graph area is not large enough.
This method is also ignored if a scale is not automatic and date labels are
informed with the method setDateLabels.
- Parameters:
isYearIncrementEnabled - A boolean value(true/false).- See Also:
setMonthOfYearIncrement(int),
ScatterGraph.setDateGraphEnabled(boolean),
setDateLabels(java.lang.String[]),
setAutoScaleEnabled(boolean)
setMonthOfYearIncrement
public void setMonthOfYearIncrement(int monthOfYearIncrement)
- Sets the month of a year increment. The only scale labels displayed are
those corresponding to this value. For instance, if the month is 4 and
a scale ranges from Sept 09,2003 to Apr 10,2008, the labels displayed
are April 2004, April 2005 and so on, until Apr 2008 is reached.
This method only has effect if date graph is enabled and year increment
is enabled. It is only applicable to scatter charts.
- Parameters:
monthOfYearIncrement - An integer value ranging from 1 to 12.- See Also:
setYearIncrementEnabled(boolean),
ScatterGraph.setDateGraphEnabled(boolean)
setLogEnabled
public void setLogEnabled(boolean isLogEnabled)
- Enables/disables a logarithmic scale. A logarithmic scale increment is based
on multiplication rather than addition, as in a linear scale. It allows
examination of values that span many orders of magnitude, and has
application in various fields, like astronomy, sound level analysis,
stock market analysis, and others.
A logarithmic scale increases exponentially, by raising the log base value
sequentially, starting with exponent 0. For example, a logarithmic scale
of base 10 is increased as follows:
1,10,100,1000,10000, and so on.
If the automatic scale flag is enabled, this method is ignored and a linear
scale is displayed instead. A logarithmic scale is always manual and only
supports values greater than or equal to 1. An exception is raised if any
series plotted against a logarithmic scale has values smaller than 1.
- Parameters:
isLogEnabled - A boolean value(true/false).- See Also:
setLogBase(int),
setLogIncrementEnabled(boolean),
setAutoScaleEnabled(boolean)
setLogBase
public void setLogBase(int logBase)
- Sets the logarithmic scale base. The base number is used to set the
magnitude of a logarithmic scale. It is sequentially raised to exponents
that usually start at 0 and increase linearly, until the resulting value reaches
the maximum scale value. For example, the numbers below make up a logarithmic
sequence of base 10 raised to exponents ranging from 0 to 4:
1,10,100,1000,10000.
The logarithmic scale base is 10, by default. It must always be a positive
number greater than 2, otherwise it defaults to 10.
- Parameters:
logBase - An integer number.- See Also:
setLogEnabled(boolean),
setLogIncrementEnabled(boolean),
setMaxValue(double),
setMinValue(double),
setIncrement(double)
setLogIncrementEnabled
public void setLogIncrementEnabled(boolean isLogIncrementEnabled)
- Enables/disables display of logarithmic values on a logarithmic
scale. If enabled, scale values are sequentially calculated
raising the log base to exponents that usually start at 0 and
increase linearly. Valid values are those within the range
delimited by the minimum and maximum scale values.
If log increment is enabled, the distance between ticks is
constant. If disabled, the distance decreases in a logarithmic
rate. Logarithmic increment is enabled by default.
- Parameters:
isLogIncrementEnabled - A boolean value(true/false).- See Also:
setLogEnabled(boolean),
setLogBase(int),
setMaxValue(double),
setMinValue(double),
setIncrement(double)
setInnerLogTicksEnabled
public void setInnerLogTicksEnabled(boolean isInnerLogTicksEnabled)
- Enables/disables display of inner ticks within two successive points of
a logarithmic scale. The coordinates of inner ticks are logarithmically calculated,
reflecting in a gradual reduction of the distance between inner ticks placed
within two successive logarithmic scale points.
This method only has effect if a logarithmic scale is enabled.
Default value is false.
- Parameters:
isInnerLogTicksEnabled - A boolean value(true/false).- See Also:
setInnerLogTicksCount(int),
setLogEnabled(boolean)
setInnerLogTicksCount
public void setInnerLogTicksCount(int innerLogTicksCount)
- Sets the number of logarithmic inner ticks to be displayed.
- Parameters:
innerLogTicksCount - An integer value.- See Also:
setInnerLogTicksEnabled(boolean)
setStartPoint
public void setStartPoint(float startPoint)
- Sets a scale starting point. The starting point is a fraction
of the vertical axis extension, ranging from 0 to 1. For instance,
if the starting point is set to 0.5 , the scale starts
at the middle point of the vertical axis. The starting
point value must not be greater than the end point.
This method only has effect with charts generated with the
Graph class.
- Parameters:
startPoint - A float number ranging from 0 to 1.- See Also:
setEndPoint(float),
Graph
setEndPoint
public void setEndPoint(float endPoint)
- Sets scale end point. The end point is a fraction
of the vertical axis extension, ranging from 0 to 1. For instance,
if the end point is set to 0.5, the scale ends
at the middle point of the vertical axis. The end point value must
not be smaller than the starting point.
This method only has effect with charts generated with the
Graph class.
- Parameters:
endPoint - A float number ranging from 0 to 1.- See Also:
setStartPoint(float),
Graph
setLabels
public void setLabels(java.lang.String[] labels)
- Sets the scale labels to be displayed, replacing the scale values,
which are automatically calculated. The labels are passed as an
array of strings, and they are placed from top to bottom or from
left to right, in vertical and horizontal charts, respectively.
- Parameters:
labels - An array of strings.
setVerticalLabelsEnabled
public void setVerticalLabelsEnabled(boolean isVerticalLabelsEnabled)
- Sets scale labels orientation to horizontal or vertical. This method
only has effect with horizontal scales.
- Parameters:
isVerticalLabelsEnabled - A boolean value(true/false).
setVisibleLabelsIndexes
public void setVisibleLabelsIndexes(int[] visibleLabelsIndexes)
- Sets the indexes of the only scale labels to be displayed.
The indexes range from 0 to the maximum number of
labels displayed minus 1. If scale is vertical the labels indexes
increase from top to bottom, and if scale is horizontal,
from left to right.
- Parameters:
visibleLabelsIndexes - An array of integer numbers.
setPosition
public void setPosition(int position)
- Deprecated.
- This method is deprecated. Use setVPosition instead.
setVPosition
public void setVPosition(int vPosition)
- Sets vertical scale position. The following rules apply to vertical
scales:
- Charts generated with classes Graph and ScatterGraph does not
support scales centered along a vertical axis. Setting the vertical
position to CENTER with these types of charts automatically resets
position to LEFT.
- Charts generated with class PolarGraph only supports vertical
scales placed to the left of or centered on the vertical axis. Setting
the vertical position to a constant other than CENTER automatically
resets position to LEFT.
setHPosition
public void setHPosition(int hPosition)
- Sets horizontal scale position. Has no effect with polar charts. Polar
charts automatically resets the scale horizontal position to BOTTOM.
- Parameters:
hPosition - One of the constants used to set a horizontal scale position.- See Also:
TOP,
BOTTOM,
TOP_BOTTOM,
PolarGraph
setVPolarEnabled
public void setVPolarEnabled(boolean isVPolarEnabled)
- Enables/disables the vertical scale on polar charts.
Default value is true.
- Parameters:
isVPolarEnabled - - See Also:
PolarGraph
setHPolarEnabled
public void setHPolarEnabled(boolean isHPolarEnabled)
- Enables/disables the horizontal scale on polar charts.
Default value is true.
- Parameters:
isHPolarEnabled - - See Also:
PolarGraph
setAutoScaleEnabled
public void setAutoScaleEnabled(boolean isAutoScaleEnabled)
- Enables/disables an automatic scale. If disabled, the increment value can
be set manually. The scale labels are automatically calculated, but if
a scale is not automatic they might overlap each other if the graph area
is not large enough.
- Parameters:
isAutoScaleEnabled - A boolean value(true/false).- See Also:
setMaxValue(double),
setMinValue(double),
setIncrement(double)
setAutoAdjustmentEnabled
public void setAutoAdjustmentEnabled(boolean isAutoAdjustmentEnabled)
- Enables/disables automatic adjustment of the max and min scale values.
If enabled, the max and min scale values are adjusted as described
below:
- The maximum scale value is the largest value between the maximum
value informed with the method
Scale.setMaxValue and the
maximum value of all series plotted against this scale object.
- The minimum scale value is the smallest value between the minimum
value informed with the method
Scale.setMinValue and the
minimum value of all series plotted against this scale object.
Automatic adjustment of the max and min scale values is disabled by
default.
- Parameters:
isAutoAdjustmentEnabled - - See Also:
setMaxValue(double),
setMinValue(double)
setMaxValue
public void setMaxValue(double maxValue)
- Sets the scale maximum value. Has no effect if automatic scale adjustment is
enabled and the maximum value is smaller than the largest value of all series
- Parameters:
maxValue - A double precision number.- See Also:
setAutoScaleEnabled(boolean),
setAutoAdjustmentEnabled(boolean),
setEndDate(java.lang.String)
setMinValue
public void setMinValue(double minValue)
- Sets the scale minimum value. Has no effect if automatic scale adjustment
is enabled and the minimum value is larger than the smallest value of all
series. If a scale is logarithmic and the minimum value is set to a
number smaller than 1, the minimum value is automatically set to 1,
which is the smallest number supported by a logarithmic scale.
By default, the minimum value is 0.
- Parameters:
minValue - A double precision number.- See Also:
setAutoScaleEnabled(boolean),
setAutoAdjustmentEnabled(boolean),
setStartDate(java.lang.String)
setIncrement
public void setIncrement(double increment)
- Sets the scale increment. Has no effect if automatic scale is enabled.
By default, the scale increment is 1. If date graph is enabled the
scale increment must be set as milliseconds. A increment of 01 second
is 1000, 01 minute is 60*1000, 01 hour is 60*60*1000, and one day is
24*60*60*1000. The constants Scale.SECOND, Scale.MINUTE, Scale.HOUR
and Scale.DAY represent the values above, and can be used to set the
scale increment in a date graph. For instance, an increment of 15 days
can be passed to this method as 15*Scale.DAY.
This method is ignored if a date graph is enabled and date labels are
informed with the method setDateLabels.
- Parameters:
increment - A double precision number.- See Also:
setAutoScaleEnabled(boolean),
ScatterGraph.setDateGraphEnabled(boolean),
setDateLabels(java.lang.String[]),
SECOND,
MINUTE,
HOUR,
DAY
setValueFormat
public void setValueFormat(java.lang.String valueFormat)
- Sets the format of values displayed along the scale.
If a value format is informed, a NumberFormat object
is created and, if possible, cast to a DecimalFormat
instance. Then all values are formatted, provided
that the 'valueFormat' parameter reflects a pattern
style provided by the java.text.DecimalFormat class.
By default, the value format is "#0.00".
- Parameters:
valueFormat - String pattern to format values.
setFont
public void setFont(java.awt.Font font)
- Sets the scale font.
- Parameters:
font - A Font object.
setColor
public void setColor(java.awt.Color color)
- Sets the scale color.
- Parameters:
color - A Color object.
setMarksColor
public void setMarksColor(java.awt.Color marksColor)
- Sets the color of the scale marks.
- Parameters:
marksColor - A Color object.
setLabelsEnabled
public void setLabelsEnabled(boolean isLabelsEnabled)
- Enables/disables display of scale labels.
- Parameters:
isLabelsEnabled - A boolean value(true/false).
setValuesEnabled
public void setValuesEnabled(boolean isValuesEnabled)
- Deprecated.
- This method has been deprecated. Use setLabelsEnabled instead.
- See Also:
setLabelsEnabled(boolean)
setMarksEnabled
public void setMarksEnabled(boolean isMarksEnabled)
- Enables/disables display of scale marks.
- Parameters:
isMarksEnabled - A boolean value(true/false).
setBackground
public void setBackground(java.awt.Color background)
- Sets background color. If opacity is disabled, the background
color is not painted. This method only has effect with polar
charts and scale labels centered on the vertical axis.
Default color is white.
- Parameters:
background - A Color object.- See Also:
setOpacityEnabled(boolean),
setVPosition(int),
CENTER,
PolarGraph
setOpacityEnabled
public void setOpacityEnabled(boolean isOpaque)
- Enables/disables opacity. If disabled, the background color
is not painted, otherwise the scale labels are painted inside
frames painted in the background color. This method only has
effect with polar charts and scale labels centered on the
vertical axis. Default value is false.
- Parameters:
isOpaque - A boolean value(true/false).- See Also:
setBackground(java.awt.Color),
setVPosition(int),
CENTER,
PolarGraph
finalize
protected void finalize()
throws java.lang.Throwable
- Throws:
java.lang.Throwable