ch.epfl.craft.maglib.magnet
Class CentralMagnetLayout

java.lang.Object
  extended bych.epfl.craft.maglib.magnet.DefaultMagnetLayout
      extended bych.epfl.craft.maglib.magnet.CentralMagnetLayout
All Implemented Interfaces:
MagnetLayout, MagnetModelListener, java.lang.Runnable
Direct Known Subclasses:
MagMapMagnetLayout

public class CentralMagnetLayout
extends DefaultMagnetLayout
implements MagnetLayout, MagnetModelListener, java.lang.Runnable

This class will layout the nodes on the MagnetView it controls. It will choose the position of each node, and the which node is visible.

Version:
1.0
Author:
Jerome Caffaro

Field Summary
 
Fields inherited from class ch.epfl.craft.maglib.magnet.DefaultMagnetLayout
boundsOfView, continueupdating, currentThread, listeners, magnetModel, numberOfVisibleNodes
 
Constructor Summary
CentralMagnetLayout()
           
 
Method Summary
 void run()
          Runs the layout algorithm.
 
Methods inherited from class ch.epfl.craft.maglib.magnet.DefaultMagnetLayout
addListener, getNumberOfVisibleNodes, modelHasChanged, removeListener, setBounds, setMagnetModel, setNumberOfVisibleNodes, stopUpdatingPositions, updatePositions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.epfl.craft.maglib.magnet.MagnetLayout
addListener, getNumberOfVisibleNodes, removeListener, setBounds, setMagnetModel, setNumberOfVisibleNodes, stopUpdatingPositions, updatePositions
 
Methods inherited from interface ch.epfl.craft.maglib.magnet.MagnetModelListener
modelHasChanged
 

Constructor Detail

CentralMagnetLayout

public CentralMagnetLayout()
Method Detail

run

public void run()
Runs the layout algorithm. Tells the receiver to update the nodes positions in the model. If model is null, does not do anything. The algorithm will begin updating the positions of the nodes, and stop only when the positions satisfy its constraints. The algorithm can also be stopped with the stopUpdatingPositions() method.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class DefaultMagnetLayout


Copyright © CRAFT EPFL. All Rights Reserved.