JIDE 3.5.15

com.jidesoft.scale
Interface PeriodConverter<T>

Type Parameters:
T - The base unit of the ScaleModel to render the periods for.
All Known Implementing Classes:
AbstractPeriodConverter, DatePeriodConverter, DefaultPeriodConverter

public interface PeriodConverter<T>

A PeriodConverter is responsible for providing UI with the (tooltip) text of a specific period interval.


Method Summary
 String getDescription(T startInstant, T endInstant)
          Gets the long text representing the period.
 String getDisplayName()
          Gets the period display name.
 T getPrototypeDisplayValue()
          Getes the prototype value.
 String getText(T startInstant, T endInstant)
          Gets the short text representing the period.
 

Method Detail

getDisplayName

String getDisplayName()
Gets the period display name. The display name will be used in the places to represent the period.

Returns:
the display name for a particular period.

getText

String getText(T startInstant,
               T endInstant)
Gets the short text representing the period. It can be used as the scale area header text.

Parameters:
startInstant - the start instance of the period
endInstant - the end instance of the period
Returns:
the short text representing the period.

getDescription

String getDescription(T startInstant,
                      T endInstant)
Gets the long text representing the period. It can be used as the scale area header tooltip.

Parameters:
startInstant - the start instance of the period
endInstant - the end instance of the period
Returns:
the long text representing the period.

getPrototypeDisplayValue

T getPrototypeDisplayValue()
Getes the prototype value. The value represents the longest expected string length for the period for the getText method.

Returns:
a value which represents the longest expected string length for the period to calculate the preferred with.

JIDE 3.5.15