de.jaret.util.ui.timebars.strategy
Interface IOverlapStrategy

All Known Implementing Classes:
DefaultOverlapStrategy

public interface IOverlapStrategy

Interface describing the strategy to calculate overlap information for a time bar viewer.

Version:
$Id: $
Author:
kliem

Method Summary
 void clearCachedData()
          Clear all cached data.
 void dispose()
          Called when a strategy is no loner used.
 int getMaxOverlapCount(TimeBarRow row)
          Retrieve tha maximal count of overlapping intervals in a row.
 OverlapInfo getOverlapInfo(TimeBarRow row, de.jaret.util.date.Interval interval)
          Retrieve the information about overlapping intervals and drawing position for a given interval.
 java.util.Map<de.jaret.util.date.Interval,OverlapInfo> updateOICache(TimeBarRow row)
          Calculate the number of overlapping intervals and determine the positions to draw them on.
 

Method Detail

getOverlapInfo

OverlapInfo getOverlapInfo(TimeBarRow row,
                           de.jaret.util.date.Interval interval)
Retrieve the information about overlapping intervals and drawing position for a given interval.

Parameters:
row - row of the interval
interval - interval
Returns:
the overlap information

getMaxOverlapCount

int getMaxOverlapCount(TimeBarRow row)
Retrieve tha maximal count of overlapping intervals in a row.

Parameters:
row - row to check
Returns:
count of maximum overlapping intervals in the row

updateOICache

java.util.Map<de.jaret.util.date.Interval,OverlapInfo> updateOICache(TimeBarRow row)
Calculate the number of overlapping intervals and determine the positions to draw them on. May Assume sorted Intervals - check the strategy implementation!

Parameters:
row - row to update the cache for
Returns:
a map containing overlap infos for every interval in the row

clearCachedData

void clearCachedData()
Clear all cached data. This method is to be called on model changes that invalidate cleared data.


dispose

void dispose()
Called when a strategy is no loner used. May be useful to help garbage collecting or disconnect listeners.



Copyright © 2012. All Rights Reserved.