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

java.lang.Object
  extended by de.jaret.util.misc.PropertyObservableBase
      extended by de.jaret.util.ui.timebars.model.IntervalRelation
All Implemented Interfaces:
de.jaret.util.misc.PropertyObservable, IIntervalRelation

public class IntervalRelation
extends de.jaret.util.misc.PropertyObservableBase
implements IIntervalRelation

Implementation of the IIntervalRelation. Handles the references itself, i.e. setting ine end to null will remove the relation from the interval.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.jaret.util.ui.timebars.model.IIntervalRelation
IIntervalRelation.Direction, IIntervalRelation.Type
 
Field Summary
protected  IIntervalRelation.Direction _direction
          the direction of the relation.
protected  IRelationalInterval _endInterval
          end interval.
protected  IRelationalInterval _startInterval
          start interval.
protected  IIntervalRelation.Type _type
          type of the relation.
 
Fields inherited from class de.jaret.util.misc.PropertyObservableBase
_propertyChangeSupport
 
Fields inherited from interface de.jaret.util.ui.timebars.model.IIntervalRelation
DIRECTION, ENDINTERVAL, STARTINTERVAL, TYPE
 
Constructor Summary
IntervalRelation(IRelationalInterval startInterval, IRelationalInterval endInterval)
          Construct a releation between two intervals (forward, end-begin).
 
Method Summary
 IIntervalRelation.Direction getDirection()
          Retrieve the direction of the relation.
 IRelationalInterval getEndInterval()
          Retrieve the end interval.
 IRelationalInterval getStartInterval()
          Retrieve the start interval.
 IIntervalRelation.Type getType()
          Retrieve the type of the relation.
 void setDirection(IIntervalRelation.Direction direction)
          Set the direction of the realtion.
 void setEndInterval(IRelationalInterval interval)
          Set the end interval.
 void setStartInterval(IRelationalInterval interval)
          Set the start interval.
 void setType(IIntervalRelation.Type type)
          Set the type of the relation.
 
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, toString, wait, wait, wait
 

Field Detail

_direction

protected IIntervalRelation.Direction _direction
the direction of the relation.


_startInterval

protected IRelationalInterval _startInterval
start interval.


_endInterval

protected IRelationalInterval _endInterval
end interval.


_type

protected IIntervalRelation.Type _type
type of the relation.

Constructor Detail

IntervalRelation

public IntervalRelation(IRelationalInterval startInterval,
                        IRelationalInterval endInterval)
Construct a releation between two intervals (forward, end-begin).

Parameters:
startInterval - first interval
endInterval - second interval
Method Detail

getDirection

public IIntervalRelation.Direction getDirection()
Retrieve the direction of the relation.

Specified by:
getDirection in interface IIntervalRelation
Returns:
the direction

setDirection

public void setDirection(IIntervalRelation.Direction direction)
Set the direction of the realtion.

Specified by:
setDirection in interface IIntervalRelation
Parameters:
direction - direction

getEndInterval

public IRelationalInterval getEndInterval()
Retrieve the end interval.

Specified by:
getEndInterval in interface IIntervalRelation
Returns:
the end interval

setEndInterval

public void setEndInterval(IRelationalInterval interval)
Set the end interval.

Specified by:
setEndInterval in interface IIntervalRelation
Parameters:
interval - the end interval

getStartInterval

public IRelationalInterval getStartInterval()
Retrieve the start interval.

Specified by:
getStartInterval in interface IIntervalRelation
Returns:
the start interval

setStartInterval

public void setStartInterval(IRelationalInterval interval)
Set the start interval.

Specified by:
setStartInterval in interface IIntervalRelation
Parameters:
interval - the start interval

getType

public IIntervalRelation.Type getType()
Retrieve the type of the relation.

Specified by:
getType in interface IIntervalRelation
Returns:
the type

setType

public void setType(IIntervalRelation.Type type)
Set the type of the relation.

Specified by:
setType in interface IIntervalRelation
Parameters:
type - the type to use


Copyright © 2012. All Rights Reserved.