edu.umd.cfar.lamp.viper.gui.core
Class DisplayWithRespectToManager

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.gui.core.DisplayWithRespectToManager

public class DisplayWithRespectToManager
extends java.lang.Object

Manages changes to and the current dwrt attribute.


Constructor Summary
DisplayWithRespectToManager()
           
 
Method Summary
 void addDisplayWRTListener(DisplayWithRespectToListener listener)
          Adds a listener for changes to which attribute/if an attribute is selected for dwrt.
protected  void fireDisplayWRTEvent()
           
 Attribute getAttribute()
          Get the current attribute that things should be done with respect to.
 Pnt getSmoothedAttrValueAtInstant(Instant i)
          Gets the dwrt point, for translation dwrt, even if the attribute doesn't have a value at the given point.
 boolean isAttributeNull()
          Tests to see if there is no dwrt attribute.
 void removeDisplayWRTListener(DisplayWithRespectToListener listener)
          Removes the dwrt change listener.
 void setAttribute(Attribute a, Instant inst)
          Set the dwrt attribute, and the frame it was set on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayWithRespectToManager

public DisplayWithRespectToManager()
Method Detail

addDisplayWRTListener

public void addDisplayWRTListener(DisplayWithRespectToListener listener)
Adds a listener for changes to which attribute/if an attribute is selected for dwrt.

Parameters:
listener - the new listener

removeDisplayWRTListener

public void removeDisplayWRTListener(DisplayWithRespectToListener listener)
Removes the dwrt change listener.

Parameters:
listener - the listener to remove

fireDisplayWRTEvent

protected void fireDisplayWRTEvent()

setAttribute

public void setAttribute(Attribute a,
                         Instant inst)
Set the dwrt attribute, and the frame it was set on.

Parameters:
a - the new dwrt attribute. Set it to null to remove the dwrt
inst - the new instant

getAttribute

public Attribute getAttribute()
Get the current attribute that things should be done with respect to.

Returns:
the dwrt attribute; null if none is selected

isAttributeNull

public boolean isAttributeNull()
Tests to see if there is no dwrt attribute.

Returns:
if there is no dwrt attribute

getSmoothedAttrValueAtInstant

public Pnt getSmoothedAttrValueAtInstant(Instant i)
Gets the dwrt point, for translation dwrt, even if the attribute doesn't have a value at the given point. This allows for consistancy when playing/editing where the value is null.

Parameters:
i - the instant to get the value at
Returns:
the projected/interpolated value