lt.monarch.chart.mapper
Class DateAxisMapper.DefaultDateScale

java.lang.Object
  extended by lt.monarch.chart.mapper.AnalogAxisScale
      extended by lt.monarch.chart.mapper.DateAxisMapper.DateScale
          extended by lt.monarch.chart.mapper.DateAxisMapper.DefaultDateScale
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, AxisScale
Enclosing class:
DateAxisMapper

protected class DateAxisMapper.DefaultDateScale
extends DateAxisMapper.DateScale

The default years scale. Units of the scale are years. Step of the scale is equal to one year.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.mapper.DateAxisMapper.DateScale
dateFormatSetByUser, dates, locale, scaleDateFormat, subScale
 
Fields inherited from class lt.monarch.chart.mapper.AnalogAxisScale
subscaleTickCount
 
Constructor Summary
Modifier Constructor and Description
protected DateAxisMapper.DefaultDateScale(int units)
          Constructs a new YearsScale.
protected DateAxisMapper.DefaultDateScale(int units, int increment)
          Constructs a new YearsScale.
 
Method Summary
Modifier and Type Method and Description
protected  java.lang.Object clone()
           
protected  java.lang.String getLabelFor(java.util.Date d)
          Converts the specified Date object to String using date format.
 AxisScale getSubScale()
          Gets a sub-scale of the scale.
 
Methods inherited from class lt.monarch.chart.mapper.DateAxisMapper.DateScale
findNearestMark, getLabelAt, getLabelAt, getLocale, getMarkCount, mapMark, mapMarkTicks, setDefaultLabelFormat, setLabelFormat, setLocale
 
Methods inherited from class lt.monarch.chart.mapper.AnalogAxisScale
getSubscaleTickCount, setSubscaleTickCount
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateAxisMapper.DefaultDateScale

protected DateAxisMapper.DefaultDateScale(int units)
Constructs a new YearsScale.

Parameters:
units - time units

DateAxisMapper.DefaultDateScale

protected DateAxisMapper.DefaultDateScale(int units,
                                          int increment)
Constructs a new YearsScale.

Parameters:
units - time units
increment - increment step
Method Detail

getSubScale

public AxisScale getSubScale()
Gets a sub-scale of the scale. If finest scale units isn't Calendar.YEAR an instance of MonthsScale is returned.

Specified by:
getSubScale in interface AxisScale
Overrides:
getSubScale in class DateAxisMapper.DateScale
Returns:
sub-scale of the scale

clone

protected java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getLabelFor

protected java.lang.String getLabelFor(java.util.Date d)
Description copied from class: DateAxisMapper.DateScale
Converts the specified Date object to String using date format.

Overrides:
getLabelFor in class DateAxisMapper.DateScale
Parameters:
d - the Date object to format
Returns:
string representation of the specified Date object