edu.uci.ics.jung.visualization.spatial.FastRenderingLayout Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jung-visualization Show documentation
Show all versions of jung-visualization Show documentation
Core visualization support for the JUNG project
The newest version!
package edu.uci.ics.jung.visualization.spatial;
import java.awt.Dimension;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import com.google.common.base.Function;
import edu.uci.ics.jung.algorithms.layout.Layout;
import edu.uci.ics.jung.graph.Graph;
/**
* break into several rectangular areas, each of which will have a reference Graph
* @author tanelso
*
* @param the vertex type
* @param the edge type
*/
public class FastRenderingLayout implements Layout {
protected Layout layout;
protected Graph graph;
protected Rectangle2D[][] grid;
public FastRenderingLayout(Layout layout) {
this.layout = layout;
}
public Graph getGraph() {
return layout.getGraph();
}
public Dimension getSize() {
return layout.getSize();
}
public void initialize() {
layout.initialize();
}
public boolean isLocked(V v) {
return layout.isLocked(v);
}
public void lock(V v, boolean state) {
layout.lock(v, state);
}
public void reset() {
layout.reset();
}
public void setGraph(Graph graph) {
// layout.setGraph(new FastRenderingGraph(graph));
}
public void setInitializer(Function initializer) {
layout.setInitializer(initializer);
}
public void setLocation(V v, Point2D location) {
layout.setLocation(v, location);
}
public void setSize(Dimension d) {
layout.setSize(d);
}
public Point2D apply(V arg0) {
return layout.apply(arg0);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy