gov.noaa.pmel.sgt
Class AxisTransform

java.lang.Object
  extended by gov.noaa.pmel.sgt.AxisTransform
All Implemented Interfaces:
Transform, java.io.Serializable
Direct Known Subclasses:
LinearTransform, LogTransform, SineTransform

public abstract class AxisTransform
extends java.lang.Object
implements Transform

Abstract base class for cartesian axis transforms. Adds additional functionality to Transform necessary for use with axes.

Since:
1.0
Version:
$Revision$, $Date$
Author:
Donald Denbo
See Also:
Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes_
           
protected  java.lang.String ident_
           
protected  double p1_
           
protected  double p2_
           
protected  boolean space_
           
protected  long t1_
           
protected  long t2_
           
protected  double u1_
           
protected  double u2_
           
 
Constructor Summary
AxisTransform()
          Default constructor.
AxisTransform(double p1, double p2, double u1, double u2)
          AxisTransform space constructor.
AxisTransform(double p1, double p2, GeoDate t1, GeoDate t2)
          AxisTransform time constructor.
AxisTransform(double p1, double p2, long t1, long t2)
          AxisTransform time constructor.
AxisTransform(Range2D pr, Range2D ur)
          AxisTransform space constructor.
AxisTransform(Range2D pr, SoTRange str)
          AxisTransform SoT constructor.
AxisTransform(Range2D pr, TimeRange tr)
          AxisTransform time constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add listener to changes in LinearTransform properties.
 java.lang.String getId()
          Get transform identifier.
 Range2D getRangeP()
          Get the physical coordinate range.
 Range2D getRangeU()
          Get the user coordinate range for double values.
 SoTRange getSoTRangeU()
          Get the user range as a SoTRange object.
abstract  SoTValue getSoTTransU(double value)
          Get user transform value as a SoTValue
 TimeRange getTimeRangeU()
          Get the user coordinate range for GeoDate values.
abstract  double getTransP(SoTValue value)
          Get physical value as a function of SoTValue.
 boolean isSpace()
          Test if transform has user double values.
 boolean isTime()
          Test if transform has user GeoDate values.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove listener from list.
 void setId(java.lang.String id)
          Set transform identifier.
 void setRangeP(double p1, double p2)
          Set physical coordinate range.
 void setRangeP(Range2D prange)
          Set physical coordinate range.
 void setRangeU(double u1, double u2)
          Set the user coordinate range for space values.
 void setRangeU(GeoDate gt1, GeoDate gt2)
          Set the user coordinate range for GeoDate values.
 void setRangeU(long t1, long t2)
           
 void setRangeU(Range2D urange)
          Set the user coordinate range for Range2D values.
 void setRangeU(SoTRange str)
          Set the user range with a SoTRange object.
 void setRangeU(TimeRange trange)
          Set the user coordinate range for TimeRange value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.noaa.pmel.sgt.Transform
getTransP, getTransU
 

Field Detail

changes_

protected java.beans.PropertyChangeSupport changes_

p1_

protected double p1_

p2_

protected double p2_

u1_

protected double u1_

u2_

protected double u2_

t1_

protected long t1_

t2_

protected long t2_

space_

protected boolean space_

ident_

protected java.lang.String ident_
Constructor Detail

AxisTransform

public AxisTransform()
Default constructor. Creates a transform with arguments AxisTransform(0.0, 1.0, 0.0, 1.0).


AxisTransform

public AxisTransform(double p1,
                     double p2,
                     double u1,
                     double u2)
AxisTransform space constructor. This constructor is used to define transforms that use double values.

Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
u1 - minimum value, user coordinates
u2 - maximum value, user coordinates
See Also:
LinearTransform

AxisTransform

public AxisTransform(Range2D pr,
                     Range2D ur)
AxisTransform space constructor. This constructor is used to define transforms that use values.

Parameters:
pr - physical coordinate range
ur - user coordinate range
See Also:
Range2D, LinearTransform

AxisTransform

public AxisTransform(double p1,
                     double p2,
                     GeoDate t1,
                     GeoDate t2)
AxisTransform time constructor. This constructor is used to define transforms that use GeoDate values.

Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
t1 - minimum time
t2 - maximum time
See Also:
GeoDate, LinearTransform

AxisTransform

public AxisTransform(double p1,
                     double p2,
                     long t1,
                     long t2)
AxisTransform time constructor. This constructor is used to define transforms that use long values to represent number of milliseconds since 1970-01-01.

Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
t1 - minimum time
t2 - maximum time
Since:
3.0
See Also:
LinearTransform

AxisTransform

public AxisTransform(Range2D pr,
                     TimeRange tr)
AxisTransform time constructor. This constructor is used to define transforms that use values.

Parameters:
pr - physical coordinates range
tr - time range
See Also:
Range2D, TimeRange, GeoDate, LinearTransform

AxisTransform

public AxisTransform(Range2D pr,
                     SoTRange str)
AxisTransform SoT constructor. This constructor uses the SoTRange class enabling the construction of a Time or Space transform.

Since:
2.0
Method Detail

setRangeP

public void setRangeP(double p1,
                      double p2)
Set physical coordinate range.
Property Change: rangeP.

Specified by:
setRangeP in interface Transform
Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
See Also:
LinearTransform

setId

public void setId(java.lang.String id)
Set transform identifier.

Parameters:
id - transform identifier

getId

public java.lang.String getId()
Get transform identifier.

Returns:
identifier

setRangeP

public void setRangeP(Range2D prange)
Set physical coordinate range.

Specified by:
setRangeP in interface Transform
Parameters:
prange - physcial coordinate range
See Also:
Range2D, LinearTransform

getRangeP

public Range2D getRangeP()
Get the physical coordinate range.

Specified by:
getRangeP in interface Transform
Returns:
physcial coordinate range
See Also:
Range2D

setRangeU

public void setRangeU(double u1,
                      double u2)
Set the user coordinate range for space values.
Property Change: rangeU.

Specified by:
setRangeU in interface Transform
Parameters:
u1 - minimum value, user coordinates
u2 - maximum value, user coordinates
See Also:
LinearTransform

setRangeU

public void setRangeU(Range2D urange)
Set the user coordinate range for Range2D values.

Specified by:
setRangeU in interface Transform
Parameters:
urange - user coordinate range
See Also:
Range2D, LinearTransform

getRangeU

public Range2D getRangeU()
Get the user coordinate range for double values.

Specified by:
getRangeU in interface Transform
Returns:
user range
See Also:
Range2D

setRangeU

public void setRangeU(GeoDate gt1,
                      GeoDate gt2)
Set the user coordinate range for GeoDate values.
Property Change: rangeU.

Parameters:
t1 - minimum time
t2 - maximum time
See Also:
GeoDate, LinearTransform

setRangeU

public void setRangeU(long t1,
                      long t2)
Since:
3.0

setRangeU

public void setRangeU(TimeRange trange)
Set the user coordinate range for TimeRange value.

Parameters:
trange - time range
See Also:
TimeRange, LinearTransform

getTimeRangeU

public TimeRange getTimeRangeU()
Get the user coordinate range for GeoDate values.

Returns:
time range
See Also:
TimeRange

setRangeU

public void setRangeU(SoTRange str)
Set the user range with a SoTRange object.

Since:
2.0

getSoTRangeU

public SoTRange getSoTRangeU()
Get the user range as a SoTRange object.

Since:
2.0

isSpace

public boolean isSpace()
Test if transform has user double values.

Returns:
true if user coordinates are double values

isTime

public boolean isTime()
Test if transform has user GeoDate values.

Returns:
true if user coordinates are GeoDate values.
See Also:
GeoDate

getTransP

public abstract double getTransP(SoTValue value)
Get physical value as a function of SoTValue.

Since:
2.0

getSoTTransU

public abstract SoTValue getSoTTransU(double value)
Get user transform value as a SoTValue

Since:
2.0

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in LinearTransform properties.

Specified by:
addPropertyChangeListener in interface Transform
Since:
2.0

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove listener from list.

Specified by:
removePropertyChangeListener in interface Transform
Since:
2.0