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

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.gui.core.PropagateInterpolateImpl
All Implemented Interfaces:
PropagateInterpolateModule

public class PropagateInterpolateImpl
extends java.lang.Object
implements PropagateInterpolateModule

An implementation of the propagation module.


Nested Class Summary
 
Nested classes inherited from class edu.umd.cfar.lamp.viper.gui.core.PropagateInterpolateModule
PropagateInterpolateModule.PropagateListener
 
Field Summary
static java.lang.String INTERPOLATE
          URI for identifying interpolation edit events.
static java.lang.String PROPAGATE
          URI for identifying propagation edit events.
 
Constructor Summary
PropagateInterpolateImpl()
          Constructs a new p/i module.
 
Method Summary
 void addPropagateListener(PropagateInterpolateModule.PropagateListener pl)
          Adds a listener for changes to the list of items to propagate.
 Interpolator getInterpolatorForType(java.lang.String type)
          Get the interpolation function object for the given data type.
 java.util.Set getPropagatingDescriptors()
          Gets all propagating descriptors.
 void interpolate(Instant start, Instant end)
          Interpolates all items on the propagation list.
 void interpolateAttributes(java.util.Iterator ats, Instant start, Instant stop)
          Interpolates only the given attributes, without reference to or modification of the propagation list.
 void interpolateDescriptors(java.util.Iterator descs, Instant start, Instant stop)
          Interpolates only the given descriptors, without reference to or modification of the propagation list.
 boolean isPropagatingThis(Descriptor d)
          Tests to see if this descriptor is on the propagation list.
 void propagate(Instant start, Instant end)
          Interpolates the value from start to the interval [start, end].
 void propagateAttributes(java.util.Iterator ats, Instant start, Instant end)
          Propagates only the given attributes, without reference to or modification of the propagation list.
 void propagateDescriptors(java.util.Iterator descs, Instant start, Instant end)
          Propagates only the given descriptors, without reference to or modification of the propagation list.
 void removePropagateListener(PropagateInterpolateModule.PropagateListener pl)
          Removes the propagation list listener.
 void setMediator(ViperViewMediator mediator)
           
 void startPropagating(Attribute attr)
          Stops the attribute from propagating, even if its descriptor is propagating.
 void startPropagating(Descriptor desc)
          Adds a descriptor to the propagate list.
 void stopPropagating()
          Stops all items from propagating.
 void stopPropagating(Attribute attr)
          Starts the attribute propagating, even if its descriptor is not propagating.
 void stopPropagating(Descriptor desc)
          Removes the given descriptor from the propagation list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPAGATE

public static final java.lang.String PROPAGATE
URI for identifying propagation edit events.

See Also:
Constant Field Values

INTERPOLATE

public static final java.lang.String INTERPOLATE
URI for identifying interpolation edit events.

See Also:
Constant Field Values
Constructor Detail

PropagateInterpolateImpl

public PropagateInterpolateImpl()
Constructs a new p/i module. It stil needs to be connected to a viper mediator.

Method Detail

setMediator

public void setMediator(ViperViewMediator mediator)

isPropagatingThis

public boolean isPropagatingThis(Descriptor d)
Description copied from interface: PropagateInterpolateModule
Tests to see if this descriptor is on the propagation list.

Specified by:
isPropagatingThis in interface PropagateInterpolateModule
Parameters:
d - the descriptor instance
Returns:
if the descriptor is propagating

getPropagatingDescriptors

public java.util.Set getPropagatingDescriptors()
Description copied from interface: PropagateInterpolateModule
Gets all propagating descriptors.

Specified by:
getPropagatingDescriptors in interface PropagateInterpolateModule
Returns:
the set of all propagating descriptors

startPropagating

public void startPropagating(Descriptor desc)
Description copied from interface: PropagateInterpolateModule
Adds a descriptor to the propagate list.

Specified by:
startPropagating in interface PropagateInterpolateModule
Parameters:
desc -

stopPropagating

public void stopPropagating()
Description copied from interface: PropagateInterpolateModule
Stops all items from propagating.

Specified by:
stopPropagating in interface PropagateInterpolateModule

stopPropagating

public void stopPropagating(Descriptor desc)
Description copied from interface: PropagateInterpolateModule
Removes the given descriptor from the propagation list.

Specified by:
stopPropagating in interface PropagateInterpolateModule
Parameters:
desc - the descriptor to remove

getInterpolatorForType

public Interpolator getInterpolatorForType(java.lang.String type)
Get the interpolation function object for the given data type.

Parameters:
type - the data type
Returns:
the interpolation object associated with the type

interpolate

public void interpolate(Instant start,
                        Instant end)
Description copied from interface: PropagateInterpolateModule
Interpolates all items on the propagation list.

Specified by:
interpolate in interface PropagateInterpolateModule
Parameters:
start - the frame to use as the start of the interpolation
end - the frame or time to use as the end value of the interpolation

propagate

public void propagate(Instant start,
                      Instant end)
Description copied from interface: PropagateInterpolateModule
Interpolates the value from start to the interval [start, end].

Specified by:
propagate in interface PropagateInterpolateModule
Parameters:
start -
end -

propagateDescriptors

public void propagateDescriptors(java.util.Iterator descs,
                                 Instant start,
                                 Instant end)
Description copied from interface: PropagateInterpolateModule
Propagates only the given descriptors, without reference to or modification of the propagation list.

Specified by:
propagateDescriptors in interface PropagateInterpolateModule
Parameters:
descs - the descriptors to propagate
start - the value of the descriptor to use, and one end of the propagation range
end - the last value to change

propagateAttributes

public void propagateAttributes(java.util.Iterator ats,
                                Instant start,
                                Instant end)
Description copied from interface: PropagateInterpolateModule
Propagates only the given attributes, without reference to or modification of the propagation list.

Specified by:
propagateAttributes in interface PropagateInterpolateModule
Parameters:
ats - the attributes to propagate
start - the value of the descriptor to use, and one end of the propagation range
end - the last value to change

interpolateDescriptors

public void interpolateDescriptors(java.util.Iterator descs,
                                   Instant start,
                                   Instant stop)
Description copied from interface: PropagateInterpolateModule
Interpolates only the given descriptors, without reference to or modification of the propagation list.

Specified by:
interpolateDescriptors in interface PropagateInterpolateModule
Parameters:
descs - the descriptors to interpolate
start - the first value of to use, and one end of the interpolation range
stop - the last value to use, and the end of the interpolation range

interpolateAttributes

public void interpolateAttributes(java.util.Iterator ats,
                                  Instant start,
                                  Instant stop)
Description copied from interface: PropagateInterpolateModule
Interpolates only the given attributes, without reference to or modification of the propagation list.

Specified by:
interpolateAttributes in interface PropagateInterpolateModule
Parameters:
ats - the attributes to interpolate
start - the first value of to use, and one end of the interpolation range
stop - the last value to use, and the end of the interpolation range

addPropagateListener

public void addPropagateListener(PropagateInterpolateModule.PropagateListener pl)
Description copied from interface: PropagateInterpolateModule
Adds a listener for changes to the list of items to propagate.

Specified by:
addPropagateListener in interface PropagateInterpolateModule
Parameters:
pl - the new listener

removePropagateListener

public void removePropagateListener(PropagateInterpolateModule.PropagateListener pl)
Description copied from interface: PropagateInterpolateModule
Removes the propagation list listener.

Specified by:
removePropagateListener in interface PropagateInterpolateModule
Parameters:
pl - the listener to remove

startPropagating

public void startPropagating(Attribute attr)
Stops the attribute from propagating, even if its descriptor is propagating.

Specified by:
startPropagating in interface PropagateInterpolateModule
Parameters:
attr - the attribute to modify
See Also:
PropagateInterpolateModule.startPropagating(viper.api.Attribute)

stopPropagating

public void stopPropagating(Attribute attr)
Starts the attribute propagating, even if its descriptor is not propagating.

Specified by:
stopPropagating in interface PropagateInterpolateModule
Parameters:
attr - the attribute to remove
See Also:
PropagateInterpolateModule.stopPropagating(viper.api.Attribute)