2 * Created on Jul 21, 2005
4 * Copyright (c) 2005, the JUNG Project and the Regents of the University
8 * This software is open-source under the BSD license; see either
10 * http://jung.sourceforge.net/license.txt for a description.
12 package edu.uci.ics.jung.algorithms.layout;
14 import java.awt.Dimension;
15 import java.awt.geom.Point2D;
17 import org.apache.commons.collections15.Transformer;
19 import edu.uci.ics.jung.graph.Graph;
22 * StaticLayout places the vertices in the locations specified by its Transformer<V,Point2D>
23 * initializer. Vertex locations can be placed in a Map<V,Point2D> and then supplied to
24 * this layout as follows:
26 Transformer<V,Point2D> vertexLocations =
27 TransformerUtils.mapTransformer(map);
29 * @author Tom Nelson - tomnelson@dev.java.net
34 public class StaticLayout<V, E> extends AbstractLayout<V,E> {
37 * Creates an instance for the specified graph, locations, and size.
39 public StaticLayout(Graph<V,E> graph, Transformer<V,Point2D> initializer, Dimension size) {
40 super(graph, initializer, size);
44 * Creates an instance for the specified graph and locations, with default size.
46 public StaticLayout(Graph<V,E> graph, Transformer<V,Point2D> initializer) {
47 super(graph, initializer);
51 * Creates an instance for the specified graph and default size; vertex locations
52 * are randomly assigned.
54 public StaticLayout(Graph<V,E> graph) {
59 * Creates an instance for the specified graph and size.
61 public StaticLayout(Graph<V,E> graph, Dimension size) {
65 public void initialize() {}
67 public void reset() {}