Class Mapping

java.lang.Object
  |
  +--Mapping
All Implemented Interfaces:
Dragable, java.io.Serializable

public class Mapping
extends java.lang.Object
implements Dragable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static double beta
           
 boolean degenerate
           
(package private)  java.awt.Graphics draggraphics
           
(package private)  int[] dragpos
           
(package private)  double dscale
           
 SegEditor editor
           
(package private)  int height
           
(package private)  float[][] im
           
 boolean isVertical
           
static double linethresh
           
(package private)  float[][] mapx
           
(package private)  double maxdist
           
(package private) static double MAXERR
           
(package private) static int MAXINTS
           
static double maxslope
           
static double mindist
           
(package private)  java.util.HashSet nearverticals
           
(package private)  int oldi
           
(package private)  int oldj
           
(package private)  java.awt.geom.AffineTransform overlaytrans
           
(package private)  int selected
           
private static long serialVersionUID
           
static double sideoff
           
(package private)  boolean solved
           
 Vertex[] spoint
           
 int stacnt
           
(package private)  int stacntplus
           
(package private)  boolean tchanged
           
static double theta
           
(package private)  QuadTree tree
           
(package private)  int wide1
           
(package private)  int wide2
           
(package private)  int width
           
(package private)  double[] xcoif
           
(package private)  double[] ycoif
           
 
Constructor Summary
Mapping(int snum, boolean isVertical)
           
 
Method Summary
(package private)  void adjustCount()
           
 void btrans(java.awt.geom.Point2D p, java.awt.geom.Point2D res)
           
(package private)  java.awt.geom.Rectangle2D btransBounds(java.awt.geom.Rectangle2D box, java.awt.geom.AffineTransform trans, double margin)
           
 void delete()
           
 void fix()
          Finish the drag perminantly fixing the selected item at the location of the last move.
 java.awt.geom.Point2D ftrans(java.awt.geom.Point2D p, java.awt.geom.Point2D.Double guess)
           
 java.awt.image.BufferedImage getImage(java.awt.Image raw, java.awt.geom.AffineTransform trans, java.awt.geom.Rectangle2D bounds, java.awt.Polygon boundary, java.lang.String str, boolean transparent)
           
 double getScale()
           
(package private)  double[] gradh(double x, double y)
           
(package private)  double h(double x, double y)
           
(package private)  double hrange(float[] mapx, java.awt.geom.Rectangle2D zone)
           
(package private)  double hsq(double xsq)
           
 void locate(java.lang.Object what, int x, int y)
           
 void move(int x, int y)
          provisionally move the selected item.
 void paint(java.awt.Graphics g, double scale)
           
 void reattachStations(Survey survey)
           
 void remove(Vertex station)
           
 boolean select(int x, int y, java.awt.Graphics g)
          select the item closest to the position given.
 java.awt.geom.AffineTransform setOverlayTrans()
           
 void setScale(double scale)
           
 void setSelection(Vertex v)
           
 void showStation(java.awt.Graphics g, double x, double y)
           
 void solve()
           
 void ttrans(java.awt.geom.Point2D pos, java.awt.geom.Point2D res, java.awt.geom.AffineTransform trans)
           
 void unmark(int p)
           
 boolean used(Vertex station)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

stacnt

public int stacnt

spoint

public Vertex[] spoint

im

float[][] im

stacntplus

int stacntplus

degenerate

public boolean degenerate

maxslope

public static double maxslope

isVertical

public boolean isVertical

xcoif

double[] xcoif

ycoif

double[] ycoif

solved

boolean solved

mapx

float[][] mapx

selected

transient int selected

dragpos

transient int[] dragpos

oldi

transient int oldi

oldj

transient int oldj

draggraphics

transient java.awt.Graphics draggraphics

dscale

transient double dscale

beta

public static double beta

theta

public static double theta

sideoff

public static double sideoff

mindist

public static double mindist

linethresh

public static double linethresh

nearverticals

java.util.HashSet nearverticals

wide1

int wide1

wide2

int wide2

overlaytrans

java.awt.geom.AffineTransform overlaytrans

tchanged

boolean tchanged

maxdist

double maxdist

width

int width

height

int height

MAXERR

static double MAXERR

MAXINTS

static int MAXINTS

tree

transient QuadTree tree

editor

public transient SegEditor editor
Constructor Detail

Mapping

public Mapping(int snum,
               boolean isVertical)
Method Detail

used

public boolean used(Vertex station)

remove

public void remove(Vertex station)

setScale

public void setScale(double scale)

getScale

public double getScale()

adjustCount

void adjustCount()

reattachStations

public void reattachStations(Survey survey)

btrans

public void btrans(java.awt.geom.Point2D p,
                   java.awt.geom.Point2D res)

fix

public void fix()
Finish the drag perminantly fixing the selected item at the location of the last move. Return true if succesfull, otherwize item is still selected.

Specified by:
fix in interface Dragable
Returns:
boolean

delete

public void delete()
Specified by:
delete in interface Dragable

unmark

public void unmark(int p)

setSelection

public void setSelection(Vertex v)

locate

public void locate(java.lang.Object what,
                   int x,
                   int y)
Specified by:
locate in interface Dragable

setOverlayTrans

public java.awt.geom.AffineTransform setOverlayTrans()

ftrans

public java.awt.geom.Point2D ftrans(java.awt.geom.Point2D p,
                                    java.awt.geom.Point2D.Double guess)

btransBounds

java.awt.geom.Rectangle2D btransBounds(java.awt.geom.Rectangle2D box,
                                       java.awt.geom.AffineTransform trans,
                                       double margin)

ttrans

public void ttrans(java.awt.geom.Point2D pos,
                   java.awt.geom.Point2D res,
                   java.awt.geom.AffineTransform trans)

getImage

public java.awt.image.BufferedImage getImage(java.awt.Image raw,
                                             java.awt.geom.AffineTransform trans,
                                             java.awt.geom.Rectangle2D bounds,
                                             java.awt.Polygon boundary,
                                             java.lang.String str,
                                             boolean transparent)
                                      throws CookKillException
CookKillException

gradh

double[] gradh(double x,
               double y)

h

double h(double x,
         double y)

hsq

double hsq(double xsq)

hrange

double hrange(float[] mapx,
              java.awt.geom.Rectangle2D zone)

move

public void move(int x,
                 int y)
provisionally move the selected item. Return true if the new position is OK

Specified by:
move in interface Dragable
Parameters:
x - float
y - float

select

public boolean select(int x,
                      int y,
                      java.awt.Graphics g)
select the item closest to the position given. Return true if an item was selected. g is a graphics object on which to display the process.

Specified by:
select in interface Dragable
Returns:
boolean

showStation

public void showStation(java.awt.Graphics g,
                        double x,
                        double y)

paint

public void paint(java.awt.Graphics g,
                  double scale)

solve

public void solve()