|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.mapper.AnalogAxisScale
lt.monarch.chart.mapper.MathAxisScale
public class MathAxisScale extends AnalogAxisScale
Axis scale implementation for MathAxisMapper.
| Modifier and Type | Class and Description |
|---|---|
static class |
MathAxisScale.SubScale
The sub-scale of MathAxisScale. |
| Modifier and Type | Field and Description |
|---|---|
protected NormalizedMathRange |
range
The mapping range |
| Fields inherited from class lt.monarch.chart.mapper.AnalogAxisScale |
|---|
subscaleTickCount |
| Constructor and Description |
|---|
MathAxisScale(NormalizedMathRange range)
Constructs a new MathAxisScale with the specified mapping range. |
| Modifier and Type | Method and Description |
|---|---|
protected AnalogAxisScale |
createSubScale()
Creates a new sub-scale of the scale. |
int |
findNearestMark(double d)
Gets the index of label nearest to the specified position on axis. |
protected java.lang.String |
formatKey(double key)
Formats and converts the specified double value to string. |
protected java.text.NumberFormat |
getDefaultNumberFormat()
Gets default number format. |
java.lang.String |
getLabelAt(int i)
Gets a label at the specified position. |
java.lang.String |
getLabelAt(int i,
java.util.Locale locale)
Gets a scale's label at the specified position. |
protected java.util.Locale |
getLastLocale()
Gets last user set locale. |
protected java.text.NumberFormat |
getLastNumberFormat()
Gets last user set number format. |
int |
getMarkCount()
Gets a number of marks in the scale. |
java.text.NumberFormat |
getNumberFormat()
Returns the user-assigned number format used to format scale's labels. |
AxisScale |
getSubScale()
Gets a sub-scale of the scale. |
double |
mapMark(int i)
Finds position on axis of scale's label with the specified index. |
double[] |
mapMarkTicks(int i)
Finds the position for the axis measurement mark ticks (some scales marks can have 2 or more ticks). |
protected void |
setDrawSubScale(boolean drawSubScale)
Sets if the sub-scale on the axis should be drawn |
protected void |
setLastLocale(java.util.Locale lastLocale)
Sets last user set locale. |
protected void |
setLastNumberFormat(java.text.NumberFormat lastNumberFormat)
Gets last user set number format. |
protected void |
setNumberFormat(java.text.NumberFormat nf)
Sets the number format for this scale. |
| Methods inherited from class lt.monarch.chart.mapper.AnalogAxisScale |
|---|
getSubscaleTickCount, setSubscaleTickCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final NormalizedMathRange range
| Constructor Detail |
|---|
public MathAxisScale(NormalizedMathRange range)
MathAxisScale with the specified mapping range.
range - the mapping range| Method Detail |
|---|
public double mapMark(int i)
i - the label indexprotected void setDrawSubScale(boolean drawSubScale)
drawSubScale - True if to draw sub-scalepublic int findNearestMark(double d)
d - the position on axis; value in range [0,1]public int getMarkCount()
public java.lang.String getLabelAt(int i)
i - the label index
public java.lang.String getLabelAt(int i,
java.util.Locale locale)
setNumberFormat method is used to format number. If number format isn't set
then default number format for the specified locale is used.
i - the label indexlocale - the localeprotected java.lang.String formatKey(double key)
format method of mapping range.
key - the double value to formatpublic AxisScale getSubScale()
protected AnalogAxisScale createSubScale()
MathAxisScale.SubScaleprotected void setNumberFormat(java.text.NumberFormat nf)
nf - the number formatpublic java.text.NumberFormat getNumberFormat()
public double[] mapMarkTicks(int i)
i - label indexprotected java.util.Locale getLastLocale()
protected java.text.NumberFormat getLastNumberFormat()
protected void setLastLocale(java.util.Locale lastLocale)
lastLocale - last user set localeprotected void setLastNumberFormat(java.text.NumberFormat lastNumberFormat)
lastNumberFormat - number formatprotected java.text.NumberFormat getDefaultNumberFormat()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||