be.ac.ulg.montefiore.run.totem.visualtopo.guiModules.topEdit.graph
Class MySettableVertexLocationFunction
java.lang.Object
be.ac.ulg.montefiore.run.totem.visualtopo.guiModules.topEdit.graph.MySettableVertexLocationFunction
- All Implemented Interfaces:
- edu.uci.ics.jung.visualization.SettableVertexLocationFunction, edu.uci.ics.jung.visualization.VertexLocationFunction
public class MySettableVertexLocationFunction
- extends java.lang.Object
- implements edu.uci.ics.jung.visualization.SettableVertexLocationFunction
Creation date: 11/10/2007
- Author:
- Gaƫl Monfort (monfort@run.montefiore.ulg.ac.be)
Method Summary |
java.awt.geom.Point2D |
getLocation(edu.uci.ics.jung.graph.ArchetypeVertex v)
Return the position of the vertex. |
java.util.Iterator |
getVertexIterator()
|
void |
setLocation(edu.uci.ics.jung.graph.ArchetypeVertex v,
java.awt.geom.Point2D location)
Set the vertex location in the hashmap and update the node location properties if they were set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MySettableVertexLocationFunction
public MySettableVertexLocationFunction(CoordMapper mapper)
- Parameters:
mapper
-
getLocation
public java.awt.geom.Point2D getLocation(edu.uci.ics.jung.graph.ArchetypeVertex v)
- Return the position of the vertex. The position is taken from the node latitude and longitude and mapped
to screen position thanks to the CoordMapper object. If the node location is not defined, return a random number.
- Specified by:
getLocation
in interface edu.uci.ics.jung.visualization.VertexLocationFunction
- Parameters:
v
-
- Returns:
getVertexIterator
public java.util.Iterator getVertexIterator()
- Specified by:
getVertexIterator
in interface edu.uci.ics.jung.visualization.VertexLocationFunction
setLocation
public void setLocation(edu.uci.ics.jung.graph.ArchetypeVertex v,
java.awt.geom.Point2D location)
- Set the vertex location in the hashmap and update the node location properties if they were set.
- Specified by:
setLocation
in interface edu.uci.ics.jung.visualization.SettableVertexLocationFunction
- Parameters:
v
- location
-
Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.