1
2
3
4
5
6 package net.kwfgrid.gwui.graphview;
7
8 import de.fzi.wim.guibase.graphview.graph.Graph;
9 import de.fzi.wim.guibase.graphview.layout.LayoutStrategy;
10
11 /***
12 Null-object for interface <code>LayoutFactory</code>. Creates instances of <code>NullLayoutStrategy</code>.
13 */
14 public class NullLayoutFactory implements LayoutFactory {
15 private static NullLayoutFactory _instance;
16
17 public static synchronized NullLayoutFactory getInstance() {
18 if (_instance == null) {
19 _instance = new NullLayoutFactory();
20 }
21 return _instance;
22 }
23
24 private NullLayoutFactory() {
25 }
26
27 public LayoutStrategy createLayoutStrategy(Graph graph) {
28 return new NullLayoutStrategy(graph);
29 }
30 }