View Javadoc
1   /*
2    * Created on Jul 21, 2005
3    *
4    * Copyright (c) 2005, The JUNG Authors 
5    *
6    * All rights reserved.
7    *
8    * This software is open-source under the BSD license; see either
9    * "license.txt" or
10   * https://github.com/jrtom/jung/blob/master/LICENSE for a description.
11   */
12  package edu.uci.ics.jung.algorithms.layout;
13  
14  import java.awt.Dimension;
15  import java.awt.geom.Point2D;
16  
17  import com.google.common.base.Function;
18  
19  import edu.uci.ics.jung.graph.Graph;
20  
21  /**
22   * StaticLayout places the vertices in the locations specified by its initializer,
23   * and has no other behavior.
24   * Vertex locations can be placed in a {@code Map<V,Point2D>} and then supplied to
25   * this layout as follows: {@code Function<V,Point2D> vertexLocations = Functions.forMap(map);}
26   * @author Tom Nelson - tomnelson@dev.java.net
27   */
28  public class StaticLayout<V, E> extends AbstractLayout<V,E> {
29  	
30      public StaticLayout(Graph<V,E> graph, Function<V,Point2D> initializer, Dimension size) {
31          super(graph, initializer, size);
32      }
33      
34      public StaticLayout(Graph<V,E> graph, Function<V,Point2D> initializer) {
35          super(graph, initializer);
36      }
37      
38      public StaticLayout(Graph<V,E> graph) {
39      	super(graph);
40      }
41      
42      public StaticLayout(Graph<V,E> graph, Dimension size) {
43      	super(graph, size);
44      }
45      
46      public void initialize() {}
47  
48  	public void reset() {}
49  }