com.jidesoft.scale
Class DatePeriodConverter
java.lang.Object
com.jidesoft.scale.AbstractPeriodConverter<Date>
com.jidesoft.scale.DatePeriodConverter
- All Implemented Interfaces:
- PeriodConverter<Date>, Serializable
public class DatePeriodConverter
- extends AbstractPeriodConverter<Date>
A PeriodConverter which converts the Date to text using the specified date formats.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE_PREFIX
public static final String RESOURCE_PREFIX
- See Also:
- Constant Field Values
DatePeriodConverter
public DatePeriodConverter(String periodName,
DateFormat labelFormat,
DateFormat toolTipFormat)
DatePeriodConverter
public DatePeriodConverter(String periodName,
DateFormat labelFormat,
DateFormat toolTipFormat,
int endFormatField)
setFormatEndDate
public void setFormatEndDate(boolean formatEndDate,
int endFormatField)
getText
public String getText(Date startInstant,
Date endInstant)
- Description copied from interface:
PeriodConverter
- Gets the short text representing the period. It can be used as the scale area header text.
- Parameters:
startInstant
- the start instance of the periodendInstant
- the end instance of the period
- Returns:
- the short text representing the period.
getDescription
public String getDescription(Date startInstant,
Date endInstant)
- Description copied from interface:
PeriodConverter
- Gets the long text representing the period. It can be used as the scale area header tooltip.
- Parameters:
startInstant
- the start instance of the periodendInstant
- the end instance of the period
- Returns:
- the long text representing the period.
getText
public String getText(DateFormat format,
Date startInstant,
Date endInstant)
format
protected String format(DateFormat format,
Date date)
createDefaultPeriodConverter
public static PeriodConverter<Date> createDefaultPeriodConverter(ScaleArea<Date> scaleArea)
createPeriodConverter
public static PeriodConverter<Date> createPeriodConverter(ScaleArea<Date> scaleArea,
DatePeriod period)