samples.preview_new_graphdraw
Class Coordinates

java.lang.Object
  extended by samples.preview_new_graphdraw.Coordinates
Direct Known Subclasses:
VisVertex

public class Coordinates
extends Object

Stores coordinates (X,Y) for vertices being visualized.

Author:
Scott White

Field Summary
 double x
          x location
 double y
          y location
 
Constructor Summary
Coordinates(Coordinates coordinates)
          Initializes this coordinate to the value of the passed-in coordinate.
Coordinates(double x, double y)
           
 
Method Summary
 boolean equals(Object o)
           
 double getX()
           
 double getY()
           
 int hashCode()
           
 void offset(double delta_x, double delta_y)
          Increases the x and y values of this scalar by (delta_x, delta_y).
 void scale(Dimension old, Dimension newDim)
           
 void setX(double d)
          Sets the x value to be d;
 void setY(double d)
          Sets the y value to be d;
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public double x
x location


y

public double y
y location

Constructor Detail

Coordinates

public Coordinates(double x,
                   double y)

Coordinates

public Coordinates(Coordinates coordinates)
Initializes this coordinate to the value of the passed-in coordinate.

Parameters:
coordinates -
Method Detail

getX

public double getX()

getY

public double getY()

setX

public void setX(double d)
Sets the x value to be d;

Parameters:
d -

setY

public void setY(double d)
Sets the y value to be d;

Parameters:
d -

offset

public void offset(double delta_x,
                   double delta_y)
Increases the x and y values of this scalar by (delta_x, delta_y).

Parameters:
delta_x -
delta_y -

scale

public void scale(Dimension old,
                  Dimension newDim)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object