|
|||||||||
| 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.DateAxisMapper.DateScale
public abstract class DateAxisMapper.DateScale extends AnalogAxisScale implements java.lang.Cloneable
Base class for all date scales.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
dateFormatSetByUser
Specifies whether date format for the scale's labels is set by user (setting date format for axis mapper or directly for the scale) or the scale it self should create default date format |
protected java.util.Date[] |
dates
An array of Date objects - scale labels |
protected java.util.Locale |
locale
Default locale |
protected java.text.DateFormat |
scaleDateFormat
The date format used to format labels of the scale |
protected AxisScale |
subScale
The sub-scale of the scale |
| Fields inherited from class lt.monarch.chart.mapper.AnalogAxisScale |
|---|
subscaleTickCount |
| Modifier | Constructor and Description |
|---|---|
protected |
DateAxisMapper.DateScale(int incrementUnits,
int incrementStep)
Sole constructor. |
| Modifier and Type | Method and Description |
|---|---|
int |
findNearestMark(double d)
Gets an index of the label or tick mark of the scale nearest to the specified position in mapper's mapping range. |
java.lang.String |
getLabelAt(int i)
Gets the scale's label with the specified index. |
java.lang.String |
getLabelAt(int i,
java.util.Locale locale)
Gets the scale label with the specified index and formated accordingly to the given locale. |
protected java.lang.String |
getLabelFor(java.util.Date d)
Converts the specified Date object to String using date format. |
java.util.Locale |
getLocale()
Returns current locale used for the DateScale |
int |
getMarkCount()
Gets number of scale marks. |
AxisScale |
getSubScale()
Gets a sub-scale of the scale. |
double |
mapMark(int i)
Returns a position of the i-th scale's label in the mappers mapping range. |
double[] |
mapMarkTicks(int i)
Finds the position for the axis measurement mark ticks (some scales marks can have 2 or more ticks). |
protected void |
setDefaultLabelFormat(java.text.DateFormat dateFormat)
Sets the default date format for the scale as label format. |
protected void |
setLabelFormat(java.text.DateFormat dateFormat)
Sets the specified date format for the scale as label format. |
void |
setLocale(java.util.Locale locale)
Sets locale for the label format |
| 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 java.text.DateFormat scaleDateFormat
protected java.util.Locale locale
protected final java.util.Date[] dates
protected boolean dateFormatSetByUser
protected AxisScale subScale
| Constructor Detail |
|---|
protected DateAxisMapper.DateScale(int incrementUnits,
int incrementStep)
incrementUnits - scale's increment unitsincrementStep - scale's increment step| Method Detail |
|---|
public void setLocale(java.util.Locale locale)
locale - locale to setpublic java.util.Locale getLocale()
protected void setLabelFormat(java.text.DateFormat dateFormat)
dateFormat - the date formatprotected void setDefaultLabelFormat(java.text.DateFormat dateFormat)
dateFormat - the date formatprotected java.lang.String getLabelFor(java.util.Date d)
d - the Date object to formatpublic java.lang.String getLabelAt(int i)
getLabelAt in interface AxisScalei - the label indexpublic double mapMark(int i)
mapMark in interface AxisScalei - the label indexpublic int findNearestMark(double d)
findNearestMark in interface AxisScaled - position in mapping range - value in range [0;1]public int getMarkCount()
getMarkCount in interface AxisScalepublic AxisScale getSubScale()
null.
getSubScale in interface AxisScale
public java.lang.String getLabelAt(int i,
java.util.Locale locale)
getLabelAt in interface AxisScalei - the label indexlocale - locale to format scale label accordingly topublic double[] mapMarkTicks(int i)
mapMarkTicks in interface AxisScalei - label index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||