edu.sc.seis.fissuresUtil.display.registrar
Class AmpConfigData

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.display.registrar.AmpConfigData
All Implemented Interfaces:
SeismogramContainerListener

public class AmpConfigData
extends java.lang.Object
implements SeismogramContainerListener

AmpConfigData encapsulates the data for a particular seismogram in a particular AmpConfig. It contains convenience methods for updating ampranges, keeping both a clean and shaled range for a seismogram, and storing the seismogram point indices over which the currently stored amp range was calculated. Created: Tue Sep 3 09:37:12 2002


Constructor Summary
AmpConfigData(DataSetSeismogram seismo, AmpConfig parent)
           
 
Method Summary
 double addScale(double newScale)
          addScale adds this scale to the existing scale after scaling it by the existing scale
 double addShift(double newShift)
          addShift adds the new shift to the current shift scaled by the amount the data is already scaled
 DataSetSeismogram getDSS()
           
 SeismogramIterator getIterator()
           
 edu.iris.Fissures.model.UnitRangeImpl getRange()
          getRange returns the current range shaled by the current scale and shift
 double getScale()
           
static DataSetSeismogram[] getSeismograms(AmpConfigData[] ampData)
           
 double getShift()
           
 MicroSecondTimeRange getTime()
          getTime is an accessor method for the time this range describes
 boolean hasNewData()
           
static boolean isAllFromSameSite(AmpConfigData[] ampData)
           
 void reset()
          sets the shift to 0, scale to 1 and clears the calculation indices
 boolean setRange(edu.iris.Fissures.model.UnitRangeImpl newRange)
          setRange updates the data with a new clean range and invalidates the old shaled range if the new range is different than the old range
 void setScale(double newScale)
          setScale clears any existing scale and sets it to the new scale
 void setShift(double newShift)
          setShift clears out the current shift and makes it equal to the newShift
 boolean setTime(MicroSecondTimeRange newRange)
          setTime sets the time for this range
 edu.iris.Fissures.model.UnitRangeImpl shale(double shift, double scale)
          shale shales the currently held clean range by the shift and scale passed in addition to any shift or scale already held by the Data
 edu.iris.Fissures.model.UnitRangeImpl shale(double shift, double scale, edu.iris.Fissures.model.UnitRangeImpl range)
          Sets the clean range to be the passed range, and then shales it by the values given in additon to any alredy held shift and scale.
 java.lang.String toString()
           
 void updateData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AmpConfigData

public AmpConfigData(DataSetSeismogram seismo,
                     AmpConfig parent)
Method Detail

updateData

public void updateData()
Specified by:
updateData in interface SeismogramContainerListener

getIterator

public SeismogramIterator getIterator()

hasNewData

public boolean hasNewData()

getDSS

public DataSetSeismogram getDSS()

setRange

public boolean setRange(edu.iris.Fissures.model.UnitRangeImpl newRange)
setRange updates the data with a new clean range and invalidates the old shaled range if the new range is different than the old range

Parameters:
newRange - the new clean range
Returns:
true if the new clean range is different than the old clean range

shale

public edu.iris.Fissures.model.UnitRangeImpl shale(double shift,
                                                   double scale)
shale shales the currently held clean range by the shift and scale passed in addition to any shift or scale already held by the Data

Parameters:
shift - additional shift for this range
scale - additional shale for this range
Returns:
the newly shaled range.

shale

public edu.iris.Fissures.model.UnitRangeImpl shale(double shift,
                                                   double scale,
                                                   edu.iris.Fissures.model.UnitRangeImpl range)
Sets the clean range to be the passed range, and then shales it by the values given in additon to any alredy held shift and scale.

Parameters:
shift - additional shift
scale - additional shale
range - the new clean range
Returns:
the shaled clean range

getRange

public edu.iris.Fissures.model.UnitRangeImpl getRange()
getRange returns the current range shaled by the current scale and shift

Returns:
the shaled range

getTime

public MicroSecondTimeRange getTime()
getTime is an accessor method for the time this range describes

Returns:
the time this range is calculated over

setTime

public boolean setTime(MicroSecondTimeRange newRange)
setTime sets the time for this range

Parameters:
newRange - the new time range
Returns:
true if the new time is different than the old one

getShift

public double getShift()
Returns:
the amount the clean range is shifted to get the shaled range

setShift

public void setShift(double newShift)
setShift clears out the current shift and makes it equal to the newShift

Parameters:
newShift - the new shift for the data

addShift

public double addShift(double newShift)
addShift adds the new shift to the current shift scaled by the amount the data is already scaled

Parameters:
newShift - the amount of shift to be added in percentage of display shifted
Returns:
the amount the current shift is after being modified by the newShift

getScale

public double getScale()

setScale

public void setScale(double newScale)
setScale clears any existing scale and sets it to the new scale

Parameters:
newScale - the new scale value

addScale

public double addScale(double newScale)
addScale adds this scale to the existing scale after scaling it by the existing scale

Parameters:
newScale - a double describing the percentage of the current display the new scale will equal
Returns:
the current scale value for the amp config data after modification

reset

public void reset()
sets the shift to 0, scale to 1 and clears the calculation indices


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSeismograms

public static DataSetSeismogram[] getSeismograms(AmpConfigData[] ampData)

isAllFromSameSite

public static boolean isAllFromSameSite(AmpConfigData[] ampData)