de.jaret.util.ui.timebars.model
Interface TimeBarRow

All Known Subinterfaces:
IIdentifiableTimeBarNode, TimeBarNode
All Known Implementing Classes:
AbstractTimeBarNode, AbstractTimeBarRowModel, AddingTimeBarNode, AddingTimeBarRowModel, DefaultTimeBarNode, DefaultTimeBarRowModel

public interface TimeBarRow

Model for a single row of intervals. When implementing the interface care should be taken to think about a performant implementation of the by-date-selecting mehtods for interval retrieval.

Version:
$Id: TimeBarRow.java 800 2008-12-27 22:27:33Z kliem $
Author:
Peter Kliem

Method Summary
 void addTimeBarRowListener(TimeBarRowListener tbrl)
          Register a TimeBarRowListener for listening to changes in the row.
 java.util.List<de.jaret.util.date.Interval> getIntervals()
          Provide the full ordered list of intervals.
 java.util.List<de.jaret.util.date.Interval> getIntervals(de.jaret.util.date.JaretDate date)
          Returns all intervals containing the given date.
 java.util.List<de.jaret.util.date.Interval> getIntervals(de.jaret.util.date.JaretDate beginDate, de.jaret.util.date.JaretDate endDate)
          Provide the intervals in beetween a given interval.
 de.jaret.util.date.JaretDate getMaxDate()
          Return the ending date of the latest interval in the row.
 de.jaret.util.date.JaretDate getMinDate()
          Return the beginning date of the earliest interval in the row.
 TimeBarRowHeader getRowHeader()
          Return the row header.
 void remTimeBarRowListener(TimeBarRowListener tbrl)
          Remove a previously added TimeBarRowListener.
 

Method Detail

getIntervals

java.util.List<de.jaret.util.date.Interval> getIntervals()
Provide the full ordered list of intervals.

Returns:
an ordered List of Intervals

getIntervals

java.util.List<de.jaret.util.date.Interval> getIntervals(de.jaret.util.date.JaretDate beginDate,
                                                         de.jaret.util.date.JaretDate endDate)
Provide the intervals in beetween a given interval. An interval should be selected as inside the given bounds if it is in between the bounds or one of the bounds is in the interval in question.

Parameters:
beginDate - first date
endDate - last date
Returns:
ordered List of Intervals between the given dates

getIntervals

java.util.List<de.jaret.util.date.Interval> getIntervals(de.jaret.util.date.JaretDate date)
Returns all intervals containing the given date.

Parameters:
date - the date to be included in the intervals
Returns:
List of intervals containing the given date

getRowHeader

TimeBarRowHeader getRowHeader()
Return the row header.

Returns:
row header

getMinDate

de.jaret.util.date.JaretDate getMinDate()
Return the beginning date of the earliest interval in the row. A row may return null if it contains no intervals. If a row supplies a min date it must always supply a max value.

Returns:
earliest date in the row or null if the row contains no intervals.

getMaxDate

de.jaret.util.date.JaretDate getMaxDate()
Return the ending date of the latest interval in the row. A row may return null if it contains no intervals. If a row supplies a max date it must always supply a min date.

Returns:
latest date in the row or null if the row contains no intervals.

addTimeBarRowListener

void addTimeBarRowListener(TimeBarRowListener tbrl)
Register a TimeBarRowListener for listening to changes in the row.

Parameters:
tbrl - TimeBarRowListener to be added

remTimeBarRowListener

void remTimeBarRowListener(TimeBarRowListener tbrl)
Remove a previously added TimeBarRowListener.

Parameters:
tbrl - TimeBarRowListener to be removed


Copyright © 2012. All Rights Reserved.