|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.mapper.AbstractAxisMapper
lt.monarch.chart.mapper.AnalogAxisMapper<DateAxisRange>
lt.monarch.chart.mapper.DateAxisMapper
public class DateAxisMapper extends AnalogAxisMapper<DateAxisRange>
Axis mapper, which maps a date range.
| Modifier and Type | Class and Description |
|---|---|
class |
DateAxisMapper.DateScale
Base class for all date scales. |
protected class |
DateAxisMapper.DefaultDateScale
The default years scale. |
protected class |
DateAxisMapper.StepScale
The date axis scale with custom scale units and step. |
| Constructor and Description |
|---|
DateAxisMapper()
Empty constructor. |
DateAxisMapper(java.util.Date start,
java.util.Date end)
Constructs a new DateAxisMapper with the specified date
range. |
DateAxisMapper(java.util.Date start,
java.util.Date end,
AxisMapperRange mapperRange)
Constructs a new DateAxisMapper with the specified date
range and mapper range. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
formatKey(java.lang.Object key)
Formats and returns the specified Date key according to general date format of the mapper. |
java.util.Calendar |
getCalendar()
Gets a calendar of the date axis mapper. |
java.text.DateFormat |
getDateFormat(int units)
Gets the general date format of the date axis mapper. |
int |
getFinestScaleUnits()
Returns the finest scale units. |
protected java.text.Format[] |
getFormats()
Gets axis mapper formats. |
DateAxisRange |
getRange()
Returns full date range of the axis. |
AxisScale |
getScale()
Returns an axis scale for this axis. |
int |
getStartingScaleUnits()
Returns the starting scale units. |
AxisMapperRange |
getViewRange()
Gets the visible range as an AxisMapperRange object. |
DateAxisRange |
getVisibleRange()
Returns a visible date range of the axis. |
double |
map(java.lang.Object key)
Maps the specified Date value into the mapping range. |
java.lang.Object |
mapBack(double pos)
Returns a Date object corresponding to the specified position in the mapping range. |
void |
setCalendar(java.util.Calendar calendar)
Sets a Calendar for this date axis mapper. |
void |
setDateFormat(java.text.DateFormat dateFormat,
int units)
Sets the date format for specified scale units. |
void |
setDateRange(java.util.Date start,
java.util.Date end)
Sets date range for the axis |
void |
setFinestScaleUnits(int units)
Sets the finest scale units. |
void |
setStartingScaleUnits(int units)
Sets the biggest scale units. |
void |
setStepScale(int units,
int step)
Sets step scale. |
void |
setTimeZone(java.util.TimeZone zone)
Sets time zone for the date axis. |
void |
setVisibleRange(java.util.Date start,
java.util.Date end)
Sets visible date range for the axis. |
| Methods inherited from class lt.monarch.chart.mapper.AnalogAxisMapper |
|---|
getPreferredHeight, getPreferredWidth |
| Methods inherited from class lt.monarch.chart.mapper.AbstractAxisMapper |
|---|
addListener, fireMappingChanged, getProjectionRange, removeListener, setProjectionRange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateAxisMapper()
DateAxisMapper with date
range from current time to 1 day after current time.
public DateAxisMapper(java.util.Date start,
java.util.Date end)
DateAxisMapper with the specified date
range.
start - start of the rangeend - end of the range
public DateAxisMapper(java.util.Date start,
java.util.Date end,
AxisMapperRange mapperRange)
DateAxisMapper with the specified date
range and mapper range.
start - start of the date rangeend - end of the date rangemapperRange - the mapper range| Method Detail |
|---|
public void setTimeZone(java.util.TimeZone zone)
zone - TimeZone object. Use new TimeZone.getTimeZone(String
timeZoneName). Default is the one which is set on current PC.public void setCalendar(java.util.Calendar calendar)
Calendar for this date axis mapper. The Calendar will
be used to extract integer fields as YEAR, MONTH, DAY and so on from Date
objects.
calendar - the calendar
public void setDateFormat(java.text.DateFormat dateFormat,
int units)
dateFormat - : desired DateFormat,units - Any of these values: Calendar.YEAR, Calendar.MONTH,
Calendar.DAY_OF_MONTHpublic java.util.Calendar getCalendar()
setCalendar(java.util.Calendar)public java.text.DateFormat getDateFormat(int units)
units - time scale unitspublic AxisMapperRange getViewRange()
AxisMapperRange object.
AxisMapperRange object representing visible mapper
rangepublic DateAxisRange getVisibleRange()
getVisibleRange in class AnalogAxisMapper<DateAxisRange>DateAxisRange - visible axis rangepublic DateAxisRange getRange()
getRange in class AnalogAxisMapper<DateAxisRange>DateAxisRange - full axis range
public void setDateRange(java.util.Date start,
java.util.Date end)
start - start dateend - end date
public void setVisibleRange(java.util.Date start,
java.util.Date end)
start - start dateend - end datepublic void setFinestScaleUnits(int units)
units - Any of these values: Calendar.YEAR, Calendar.MONTH,
Calendar.WEEK_OF_MONTH, Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND,
Calendar.MILLISECONDpublic void setStartingScaleUnits(int units)
units - Any of these values: Calendar.YEAR, Calendar.MONTH,
Calendar.WEEK_OF_MONTH, Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND,
Calendar.MILLISECOND
public void setStepScale(int units,
int step)
units - Any of these values: Calendar.YEAR, Calendar.MONTH,
Calendar.WEEK_OF_MONTH, Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND,
Calendar.MILLISECONDstep - scale steppublic int getFinestScaleUnits()
setFinestScaleUnits(int)public int getStartingScaleUnits()
setStartingScaleUnits(int)public double map(java.lang.Object key)
key - the Date to mapkey in the date range; a value in range
[0,1]public java.lang.Object mapBack(double pos)
mapBack in interface AxisMappermapBack in class AbstractAxisMapperpos - position in range [0;1]AxisMapper.mapBack(double)public AxisScale getScale()
public java.lang.String formatKey(java.lang.Object key)
key - the Date key to formatprotected java.text.Format[] getFormats()
AnalogAxisMapper
getFormats in class AnalogAxisMapper<DateAxisRange>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||