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

All Known Implementing Classes:
AbstractTimeBarModel, DefaultTimeBarModel, StdHierarchicalTimeBarModel

public interface TimeBarModel

Model for a number of rows containing intervals.

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

Method Summary
 void addTimeBarModelListener(TimeBarModelListener tbml)
          Add a listener to listen for changes in the model.
 de.jaret.util.date.JaretDate getMaxDate()
          Retrieve tha latesr dat ein the model.
 de.jaret.util.date.JaretDate getMinDate()
          Retrieve the earliest date in the model.
 TimeBarRow getRow(int row)
          Return the row for the given index.
 int getRowCount()
          Get the number of rows in the model.
 TimeBarRow getRowForInterval(de.jaret.util.date.Interval interval)
          Retrieve the TimeBarRow for a given interval.
 void remTimeBarModelListener(TimeBarModelListener tbml)
          Removes a previously added listener.
 

Method Detail

getRow

TimeBarRow getRow(int row)
Return the row for the given index.

Parameters:
row - index of the row
Returns:
the row for the given index

getRowCount

int getRowCount()
Get the number of rows in the model.

Returns:
number of rows

getMinDate

de.jaret.util.date.JaretDate getMinDate()
Retrieve the earliest date in the model.

Returns:
earliest date in the model

getMaxDate

de.jaret.util.date.JaretDate getMaxDate()
Retrieve tha latesr dat ein the model.

Returns:
the latest date in the model

getRowForInterval

TimeBarRow getRowForInterval(de.jaret.util.date.Interval interval)
Retrieve the TimeBarRow for a given interval.

Parameters:
interval - interval to gt the row for.
Returns:
TimeBarRow that contains the interval or null if no row could be determined.

addTimeBarModelListener

void addTimeBarModelListener(TimeBarModelListener tbml)
Add a listener to listen for changes in the model.

Parameters:
tbml - TimeBarModelListener for watching the model

remTimeBarModelListener

void remTimeBarModelListener(TimeBarModelListener tbml)
Removes a previously added listener.

Parameters:
tbml - TimeBarModelListener to be removed


Copyright © 2012. All Rights Reserved.