Coverage details for edu.uci.ics.jung.visualization.LayoutDecorator

LineHitsSource
1 /*
2  * Copyright (c) 2005, the JUNG Project and the Regents of the University of
3  * California All rights reserved.
4  *
5  * This software is open-source under the BSD license; see either "license.txt"
6  * or http://jung.sourceforge.net/license.txt for a description.
7  *
8  * Created on Aug 23, 2005
9  */
10  
11 package edu.uci.ics.jung.visualization;
12  
13 import java.awt.Dimension;
14 import java.awt.geom.Point2D;
15 import java.util.Iterator;
16 import java.util.Set;
17  
18 import javax.swing.event.ChangeListener;
19  
20 import edu.uci.ics.jung.graph.ArchetypeVertex;
21 import edu.uci.ics.jung.graph.Graph;
22 import edu.uci.ics.jung.graph.Vertex;
23 import edu.uci.ics.jung.utils.ChangeEventSupport;
24 import edu.uci.ics.jung.utils.DefaultChangeEventSupport;
25  
26 /**
27  * a pure decorator for the Layout interface. Intended to be overridden
28  * to provide specific behavior decoration
29  * @see PersistentLayoutImpl
30  * @author Tom Nelson - RABA Technologies
31  *
32  *
33  */
34 public abstract class LayoutDecorator implements Layout, ChangeEventSupport {
35     
36     protected Layout delegate;
370    protected ChangeEventSupport changeSupport =
38         new DefaultChangeEventSupport(this);
39  
400    public LayoutDecorator(Layout delegate) {
410        this.delegate = delegate;
420    }
43  
44     /**
45      * getter for the delegate
46      * @return the delegate
47      */
48     public Layout getDelegate() {
490        return delegate;
50     }
51  
52     /**
53      * setter for the delegate
54      * @param delegate the new delegate
55      */
56     public void setDelegate(Layout delegate) {
570        this.delegate = delegate;
580    }
59  
60     /**
61      * @see edu.uci.ics.jung.visualization.Layout#advancePositions()
62      */
63     public void advancePositions() {
640        delegate.advancePositions();
650    }
66  
67     /**
68      * @see edu.uci.ics.jung.visualization.Layout#applyFilter(edu.uci.ics.jung.graph.Graph)
69      */
70     public void applyFilter(Graph subgraph) {
710        delegate.applyFilter(subgraph);
720    }
73  
74     /**
75      * @see edu.uci.ics.jung.visualization.Layout#forceMove(edu.uci.ics.jung.graph.Vertex, double, double)
76      */
77     public void forceMove(Vertex picked, double x, double y) {
780        delegate.forceMove(picked, x, y);
790    }
80  
81     /**
82      * @see edu.uci.ics.jung.visualization.Layout#getCurrentSize()
83      */
84     public Dimension getCurrentSize() {
850        return delegate.getCurrentSize();
86     }
87  
88     /**
89      * @see edu.uci.ics.jung.visualization.Layout#getGraph()
90      */
91     public Graph getGraph() {
920        return delegate.getGraph();
93     }
94  
95     /**
96      * @see edu.uci.ics.jung.visualization.Layout#getLocation(edu.uci.ics.jung.graph.ArchetypeVertex)
97      */
98     public Point2D getLocation(ArchetypeVertex v) {
990        return delegate.getLocation(v);
100     }
101  
102     /**
103      * @see edu.uci.ics.jung.visualization.Layout#getStatus()
104      */
105     public String getStatus() {
1060        return delegate.getStatus();
107     }
108  
109     /**
110      * @see edu.uci.ics.jung.visualization.Layout#getVertex(double, double, double)
111      */
112     public Vertex getVertex(double x, double y, double maxDistance) {
1130        return delegate.getVertex(x, y, maxDistance);
114     }
115  
116     /**
117      * @see edu.uci.ics.jung.visualization.Layout#getVertex(double, double)
118      */
119     public Vertex getVertex(double x, double y) {
1200        return delegate.getVertex(x, y);
121     }
122  
123     /**
124      * @see edu.uci.ics.jung.visualization.VertexLocationFunction#getVertexIterator()
125      */
126     public Iterator getVertexIterator() {
1270        return delegate.getVertexIterator();
128     }
129  
130     /**
131      * @see edu.uci.ics.jung.visualization.Layout#getVisibleEdges()
132      */
133     public Set getVisibleEdges() {
1340        return delegate.getVisibleEdges();
135     }
136  
137     /**
138      * @see edu.uci.ics.jung.visualization.Layout#getVisibleVertices()
139      */
140     public Set getVisibleVertices() {
1410        return delegate.getVisibleVertices();
142     }
143  
144     /**
145      * @see edu.uci.ics.jung.visualization.Layout#getX(edu.uci.ics.jung.graph.Vertex)
146      */
147     public double getX(Vertex v) {
1480        return delegate.getX(v);
149     }
150  
151     /**
152      * @see edu.uci.ics.jung.visualization.Layout#getY(edu.uci.ics.jung.graph.Vertex)
153      */
154     public double getY(Vertex v) {
1550        return delegate.getY(v);
156     }
157  
158     /**
159      * @see edu.uci.ics.jung.visualization.Layout#incrementsAreDone()
160      */
161     public boolean incrementsAreDone() {
1620        return delegate.incrementsAreDone();
163     }
164  
165     /**
166      * @see edu.uci.ics.jung.visualization.Layout#initialize(java.awt.Dimension)
167      */
168     public void initialize(Dimension currentSize) {
1690        delegate.initialize(currentSize);
1700    }
171  
172     /**
173      * @see edu.uci.ics.jung.visualization.Layout#isIncremental()
174      */
175     public boolean isIncremental() {
1760        return delegate.isIncremental();
177     }
178  
179     /**
180      * @see edu.uci.ics.jung.visualization.Layout#lockVertex(edu.uci.ics.jung.graph.Vertex)
181      */
182     public void lockVertex(Vertex v) {
1830        delegate.lockVertex(v);
1840    }
185  
186     /**
187      * @see edu.uci.ics.jung.visualization.Layout#isLocked(Vertex)
188      */
189     public boolean isLocked(Vertex v)
190     {
1910        return delegate.isLocked(v);
192     }
193     
194     /**
195      * @see edu.uci.ics.jung.visualization.Layout#resize(java.awt.Dimension)
196      */
197     public void resize(Dimension d) {
1980        delegate.resize(d);
1990    }
200  
201     /**
202      * @see edu.uci.ics.jung.visualization.Layout#restart()
203      */
204     public void restart() {
2050        delegate.restart();
2060    }
207  
208     /**
209      * @see edu.uci.ics.jung.visualization.Layout#unlockVertex(edu.uci.ics.jung.graph.Vertex)
210      */
211     public void unlockVertex(Vertex v) {
2120        delegate.unlockVertex(v);
2130    }
214  
215     public void addChangeListener(ChangeListener l) {
2160        changeSupport.addChangeListener(l);
2170    }
218  
219     public void removeChangeListener(ChangeListener l) {
2200        changeSupport.removeChangeListener(l);
2210    }
222  
223     public ChangeListener[] getChangeListeners() {
2240        return changeSupport.getChangeListeners();
225     }
226  
227     public void fireStateChanged() {
2280        changeSupport.fireStateChanged();
2290    }
230 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.