de.jaret.util.ui.timebars.model
Class DefaultTimeBarRowModel

java.lang.Object
  extended by de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
      extended by de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel
All Implemented Interfaces:
TimeBarRow, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
DefaultTimeBarNode

public class DefaultTimeBarRowModel
extends AbstractTimeBarRowModel

A base implementation of the TimeBarRow interface as an extension of the abstract implementation AbstractTimeBarRowModel. When this default model is used be aware of some possible performance optimizations that can be made when dealing with a specialized model (see comments).

Version:
$Id: DefaultTimeBarRowModel.java 858 2009-05-06 22:15:51Z kliem $
Author:
Peter Kliem

Field Summary
protected  java.util.List<de.jaret.util.date.Interval> _intervals
          list storing the intervals.
 
Fields inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
_header, _listenerList, _maxDate, _minDate
 
Constructor Summary
DefaultTimeBarRowModel()
          Default constructor.
DefaultTimeBarRowModel(TimeBarRowHeader header)
          Construct a row supplying a header.
 
Method Summary
 void addInterval(de.jaret.util.date.Interval interval)
          Add an interval.
 void addIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
          Add more than one interval to the row (avoiding unnecessary updates for every interval).
 void clear()
          Clear the row of all intervals.
 java.util.List<de.jaret.util.date.Interval> getIntervals()
          Provide the full ordered list of intervals.
 void remInterval(de.jaret.util.date.Interval interval)
          Remove an interval.
 void remIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
          Remove a list of intervals.
 
Methods inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
addTimeBarRowListener, fireElementAdded, fireElementChanged, fireElementRemoved, fireHeaderChanged, fireRowDataChanged, getIntervals, getIntervals, getMaxDate, getMinDate, getRowHeader, propertyChange, remTimeBarRowListener, setRowHeader, updateMinMax
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_intervals

protected java.util.List<de.jaret.util.date.Interval> _intervals
list storing the intervals.

Constructor Detail

DefaultTimeBarRowModel

public DefaultTimeBarRowModel()
Default constructor.


DefaultTimeBarRowModel

public DefaultTimeBarRowModel(TimeBarRowHeader header)
Construct a row supplying a header.

Parameters:
header - row header
Method Detail

getIntervals

public java.util.List<de.jaret.util.date.Interval> getIntervals()
Provide the full ordered list of intervals. Remains abstract and has to implemented.

Specified by:
getIntervals in interface TimeBarRow
Specified by:
getIntervals in class AbstractTimeBarRowModel
Returns:
an ordered List of Intervals

addInterval

public void addInterval(de.jaret.util.date.Interval interval)
Add an interval.

Parameters:
interval - interval to add

addIntervals

public void addIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
Add more than one interval to the row (avoiding unnecessary updates for every interval).

Parameters:
intervals - list of intervals

remInterval

public void remInterval(de.jaret.util.date.Interval interval)
Remove an interval.

Parameters:
interval - interval to remove

remIntervals

public void remIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
Remove a list of intervals. Please note that the selection can not be adjusted correctly -> do it yourself.

Parameters:
intervals - list of intervals to remove

clear

public void clear()
Clear the row of all intervals. Please note that the selection can not be adjusted correctly -> do it yourself.



Copyright © 2012. All Rights Reserved.