ch.epfl.craft.maglib.magnet
Class SpringPoint
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
ch.epfl.craft.maglib.magnet.SpringPoint
- All Implemented Interfaces:
- java.lang.Cloneable
- public class SpringPoint
- extends java.awt.geom.Point2D.Double
A node to be manipulated in a spring layout
A SpringPoint encapsulates a Point and its fixedness
- Version:
- 1.0
- Author:
- Gregory Dyke
| Nested classes inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
|
Constructor Summary |
SpringPoint(double x,
double y,
boolean isfixed)
Create a new SpringPoint |
SpringPoint(java.awt.geom.Point2D p,
boolean isfixed)
|
| Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation, toString |
| Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
isfixed
protected boolean isfixed
currentforce
protected Vector2D currentforce
SpringPoint
public SpringPoint(double x,
double y,
boolean isfixed)
- Create a new
SpringPoint
- Parameters:
x - x coordinate of pointisfixed - whether the point can be moved or not.
SpringPoint
public SpringPoint(java.awt.geom.Point2D p,
boolean isfixed)
isFixed
public boolean isFixed()
getCurrentforce
public Vector2D getCurrentforce()
setCurrentforce
public void setCurrentforce(Vector2D currentforce)
move
public void move(Vector2D that)
movebyForce
public void movebyForce()
Copyright © CRAFT EPFL. All Rights Reserved.