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

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.display.registrar.BasicLayoutConfig
All Implemented Interfaces:
DataSetSeismogramReceptacle, LayoutConfig
Direct Known Subclasses:
AzimuthLayoutConfig, BackAzimuthLayoutConfig, CustomLayOutConfig

public class BasicLayoutConfig
extends java.lang.Object
implements LayoutConfig


Field Summary
protected  java.util.List seis
           
protected  java.util.Map valueMap
           
 
Constructor Summary
BasicLayoutConfig()
           
BasicLayoutConfig(DataSetSeismogram[] seismos)
           
 
Method Summary
 void add(DataSetSeismogram[] seismos)
          add adds all of the seismograms in the array to the receptacle
 void addListener(LayoutListener listener)
           
 void clear()
          clear removes all seismograms from this receptacle
 boolean contains(DataSetSeismogram seismo)
          contains checks the receptacle for the presence of seismo
 void fireLayoutEvent()
          fires a layout event to all LayoutListeners with an event from generateLayoutEvent()
 LayoutEvent generateLayoutEvent()
           
 java.lang.String getLabel()
           
 LayoutEvent getLayout()
           
 double getScale()
           
 DataSetSeismogram[] getSeismograms()
          returns all of the seismograms held by this receptacle
 void remove(DataSetSeismogram[] seismos)
          Attempts to remove all given seismograms from this Config.
 void removeListener(LayoutListener listener)
           
 void reset()
          reset takes all of the seismograms contained in this receptacle and sets their state as if they had just been added to the receptacle and sets the instance varaibles of the receptacle back to their initial states
 void reset(DataSetSeismogram[] seismos)
          reset takes all of the seismograms in the array and sets their state as if they had just been initially added to the receptacle
 void setScale(double scale)
          sets the amount by which every seismogram in the layout is being scaled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valueMap

protected java.util.Map valueMap

seis

protected java.util.List seis
Constructor Detail

BasicLayoutConfig

public BasicLayoutConfig()

BasicLayoutConfig

public BasicLayoutConfig(DataSetSeismogram[] seismos)
Method Detail

addListener

public void addListener(LayoutListener listener)
Specified by:
addListener in interface LayoutConfig

removeListener

public void removeListener(LayoutListener listener)
Specified by:
removeListener in interface LayoutConfig

fireLayoutEvent

public void fireLayoutEvent()
Description copied from interface: LayoutConfig
fires a layout event to all LayoutListeners with an event from generateLayoutEvent()

Specified by:
fireLayoutEvent in interface LayoutConfig

add

public void add(DataSetSeismogram[] seismos)
Description copied from interface: DataSetSeismogramReceptacle
add adds all of the seismograms in the array to the receptacle

Specified by:
add in interface DataSetSeismogramReceptacle
Parameters:
seismos - a DataSetSeismogram[] containing seismograms to be added to this receptacle

remove

public void remove(DataSetSeismogram[] seismos)
Attempts to remove all given seismograms from this Config. If any are removed, a layout event is fired

Specified by:
remove in interface DataSetSeismogramReceptacle
Parameters:
seismos - DataSetSeismogram[] an array of seismograms to be removed

contains

public boolean contains(DataSetSeismogram seismo)
Description copied from interface: DataSetSeismogramReceptacle
contains checks the receptacle for the presence of seismo

Specified by:
contains in interface DataSetSeismogramReceptacle
Parameters:
seismo - the seismogram whose presence is to be tested
Returns:
true if the receptacle contains seismo, false otherwise

clear

public void clear()
Description copied from interface: DataSetSeismogramReceptacle
clear removes all seismograms from this receptacle

Specified by:
clear in interface DataSetSeismogramReceptacle

getSeismograms

public DataSetSeismogram[] getSeismograms()
Description copied from interface: DataSetSeismogramReceptacle
returns all of the seismograms held by this receptacle

Specified by:
getSeismograms in interface DataSetSeismogramReceptacle
Returns:
an array containing all of this receptacles seismograms

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface LayoutConfig

reset

public void reset()
Description copied from interface: DataSetSeismogramReceptacle
reset takes all of the seismograms contained in this receptacle and sets their state as if they had just been added to the receptacle and sets the instance varaibles of the receptacle back to their initial states

Specified by:
reset in interface DataSetSeismogramReceptacle

reset

public void reset(DataSetSeismogram[] seismos)
Description copied from interface: DataSetSeismogramReceptacle
reset takes all of the seismograms in the array and sets their state as if they had just been initially added to the receptacle

Specified by:
reset in interface DataSetSeismogramReceptacle
Parameters:
seismos - a DataSetSeismogram[] value containing seismograms to be reset

getScale

public double getScale()
Specified by:
getScale in interface LayoutConfig

setScale

public void setScale(double scale)
sets the amount by which every seismogram in the layout is being scaled

Specified by:
setScale in interface LayoutConfig
Parameters:
scale - - the factor by which the seismogram height is multiplied

generateLayoutEvent

public LayoutEvent generateLayoutEvent()
Specified by:
generateLayoutEvent in interface LayoutConfig

getLayout

public LayoutEvent getLayout()
Specified by:
getLayout in interface LayoutConfig