ch.epfl.craft.maglib.magnet
Class SpringLayout
java.lang.Object
ch.epfl.craft.maglib.magnet.SpringLayout
- public class SpringLayout
- extends java.lang.Object
A spring layout lays out some SpringPoints in function of the Springs between them
Once the model is set up, call doIteration() to move to the next state
- Version:
- 1.0
- Author:
- Gregory Dyke
|
Field Summary |
protected java.util.ArrayList |
points
|
protected java.util.ArrayList |
springs
|
|
Constructor Summary |
SpringLayout()
Create a new SpringLayout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
points
protected java.util.ArrayList points
springs
protected java.util.ArrayList springs
SpringLayout
public SpringLayout()
- Create a new
SpringLayout
doIteration
public void doIteration()
- Do an iteration of springlayouting
addPoint
public int addPoint(SpringPoint p)
addPoint
public int addPoint(double x,
double y,
boolean isfixed)
addPoint
public int addPoint(java.awt.Point p,
boolean isfixed)
addSpring
public void addSpring(Spring s)
addSpring
public void addSpring(SpringPoint head,
SpringPoint tail,
double len,
double konst)
addSpring
public void addSpring(int head,
int tail,
double len,
double konst)
Copyright © CRAFT EPFL. All Rights Reserved.