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

java.lang.Object
  extended by de.jaret.util.misc.PropertyObservableBase
      extended by de.jaret.util.date.IntervalImpl
          extended by de.jaret.util.ui.timebars.model.RelationalInterval
All Implemented Interfaces:
de.jaret.util.date.Interval, de.jaret.util.misc.PropertyObservable, IRelationalInterval, java.beans.PropertyChangeListener, java.util.EventListener

public class RelationalInterval
extends de.jaret.util.date.IntervalImpl
implements IRelationalInterval

Simple implementation of the relational interval based on the standard interval. Handles the relation when a relation is removed (setting the appropriate field in the relation to null. Does handle

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

Field Summary
protected  java.util.List<IIntervalRelation> _relations
          list of relations.
 
Fields inherited from class de.jaret.util.date.IntervalImpl
_begin, _end
 
Fields inherited from class de.jaret.util.misc.PropertyObservableBase
_propertyChangeSupport
 
Fields inherited from interface de.jaret.util.ui.timebars.model.IRelationalInterval
RELATIONS
 
Fields inherited from interface de.jaret.util.date.Interval
PROP_BEGIN, PROP_END
 
Constructor Summary
RelationalInterval()
           
 
Method Summary
 void addRelation(IIntervalRelation relation)
          Add an interval relation.
 java.util.List<IIntervalRelation> getRelations()
          Retrieve all relations of the interval.
 void removeRelation(IIntervalRelation relation)
          Remove a relation.
 
Methods inherited from class de.jaret.util.date.IntervalImpl
contains, contains, containsNonIncluding, containsStatic, getBegin, getEnd, getSeconds, intersect, intersectNonIncluding, intersects, propertyChange, setBegin, setEnd, toString
 
Methods inherited from class de.jaret.util.misc.PropertyObservableBase
addPropertyChangeListener, firePropertyChange, isRealModification, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.jaret.util.date.Interval
contains, contains, getBegin, getEnd, getSeconds, intersects, setBegin, setEnd
 
Methods inherited from interface de.jaret.util.misc.PropertyObservable
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

_relations

protected java.util.List<IIntervalRelation> _relations
list of relations.

Constructor Detail

RelationalInterval

public RelationalInterval()
Method Detail

addRelation

public void addRelation(IIntervalRelation relation)
Add an interval relation.

Specified by:
addRelation in interface IRelationalInterval
Parameters:
relation - relation to be added

getRelations

public java.util.List<IIntervalRelation> getRelations()
Retrieve all relations of the interval.

Specified by:
getRelations in interface IRelationalInterval
Returns:
list of relations

removeRelation

public void removeRelation(IIntervalRelation relation)
Remove a relation.. Removes the reference from the relation.

Specified by:
removeRelation in interface IRelationalInterval
Parameters:
relation - relation to be removed.


Copyright © 2012. All Rights Reserved.