|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the bases unit of the scale, for example Date or Integer.public interface ScaleModel<T>
A ScaleModel
holds the different scales which the ScaleArea
of a GanttChart
can show. The model provides functions to map an instant in the base unit to a position on a long scale.
Method Summary | |
---|---|
T |
getDefaultEnd()
|
T |
getDefaultStart()
|
T |
getInstantAt(long position)
Maps the position to a instant on the scale. |
List<T> |
getPeriodBoundaries(Period period,
T startInstant,
T endInstant)
Calculates the periods start/end instants which completely include the specified start and end instant. |
T |
getPeriodEnd(Period period,
T instant)
This method returns the end of period in which the instant falls, which is the start instant of the next period. |
List<Period> |
getPeriods()
The returned list should contain at least one Period. |
T |
getPeriodStart(Period period,
T instant)
|
long |
getPosition(T instant)
Maps the unit to a long so it can be gives a position in the UI. |
Method Detail |
---|
T getDefaultStart()
T getDefaultEnd()
long getPosition(T instant)
instant
- The instant to get the position for.
T getInstantAt(long position)
position
- The position to get the instant for.
T getPeriodStart(Period period, T instant)
period
- A period which was returned from getPeriods().instant
- The instant to get the period start for.
T getPeriodEnd(Period period, T instant)
T periodEnd = getPeriodsEnd(period, instant); assertTrue(periodEnd == getPeriodStart(period, periodEnd));
period
- A period which was returned from getPeriods().instant
- The instant to get the period end for.
List<T> getPeriodBoundaries(Period period, T startInstant, T endInstant)
period
- The period for when the start and end instants should be calculated.startInstant
- The start instant.endInstant
- The end instant.
List<Period> getPeriods()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |