Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.util.AdjustableSwath

java.lang.Object
  |
  +--ncsa.horizon.util.Swath
        |
        +--ncsa.horizon.util.AdjustableSwath

public class AdjustableSwath
extends Swath
implements SafeAsMetadata
a straight path between two voxels whose ends can be moved.

See Also:
Swath, Serialized Form

Fields inherited from class ncsa.horizon.util.Swath
end, start
 
Constructor Summary
AdjustableSwath(Voxel start, Voxel end)
          Create a new Swath given its beginning and ending Voxel.
AdjustableSwath(int naxes)
          Create a default Swath of zero length
AdjustableSwath()
          Create a default Swath of zero length in a 2-dimensional space
AdjustableSwath(Swath in)
          Create a Swath that is a copy of another Swath.
 
Method Summary
java.util.Observable getMonitor()
          return an Observable monitor for listening for changes to this Volume.
boolean isMutable()
          return true if the paramters of this Volume can change.
void setEnd(Voxel vox)
          set the ending position.
void setEnd(int[] pos)
          set the ending position.
void setEnd(double[] pos)
          set the ending position.
void setEnd(int axis, int pos)
          set a component of the ending position.
void setEnd(int axis, double pos)
          set a component of the ending position.
void setStart(Voxel vox)
          set the starting position.
void setStart(int[] pos)
          set the starting position.
void setStart(double[] pos)
          set the starting position.
void setStart(int axis, int pos)
          set a component of the starting position.
void setStart(int axis, double pos)
          set a component of the starting position.
 
Methods inherited from class ncsa.horizon.util.Swath
clone, equals, getEndPos, getEndPos, getEnd, getExactEndPos, getExactEndPos, getExactStartPos, getExactStartPos, getLength, getLength, getMonitor, getProjection, getStartPos, getStartPos, getStart, isMutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

AdjustableSwath

public AdjustableSwath(Voxel start,
                       Voxel end)
Create a new Swath given its beginning and ending Voxel. The dimensionality will be set to the maximum of that for the two Voxels given; positions from any missing axes will be set to zero.

AdjustableSwath

public AdjustableSwath(int naxes)
Create a default Swath of zero length
Parameters:
naxes - the dimensionality of the space.

AdjustableSwath

public AdjustableSwath()
Create a default Swath of zero length in a 2-dimensional space

AdjustableSwath

public AdjustableSwath(Swath in)
Create a Swath that is a copy of another Swath. This constructor is useful when converting an immutable swath to a mutable one.
Method Detail

isMutable

public boolean isMutable()
return true if the paramters of this Volume can change. This implementation always returns true.
Overrides:
isMutable in class Swath

getMonitor

public java.util.Observable getMonitor()
return an Observable monitor for listening for changes to this Volume. Clients interested in such changes can add themselves to the Observable returned by this method. They will be notified when any of the Volume parameters position change, passing this Volume as an argument to the Observers' update() method.
Overrides:
getMonitor in class Swath

setStart

public void setStart(Voxel vox)
set the starting position. Missing axes will be set to zero

setStart

public void setStart(int[] pos)
set the starting position. Missing axes will be set to zero

setStart

public void setStart(double[] pos)
set the starting position. Missing axes will be set to zero

setStart

public void setStart(int axis,
                     int pos)
set a component of the starting position. Missing axes will be set to zero.

setStart

public void setStart(int axis,
                     double pos)
set a component of the starting position. Missing axes will be set to zero.

setEnd

public void setEnd(Voxel vox)
set the ending position. Missing axes will be set to zero

setEnd

public void setEnd(int[] pos)
set the ending position. Missing axes will be set to zero

setEnd

public void setEnd(double[] pos)
set the ending position. Missing axes will be set to zero

setEnd

public void setEnd(int axis,
                   int pos)
set a component of the ending position. Missing axes will be set to zero.

setEnd

public void setEnd(int axis,
                   double pos)
set a component of the ending position. Missing axes will be set to zero.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD