Package org.jungrapht.visualization.util
Class BoundingRectangleCollector<T>
- java.lang.Object
-
- org.jungrapht.visualization.util.BoundingRectangleCollector<T>
-
- Type Parameters:
T
- the type to collect bounds for, either vertices or edges (see subclasses)
- Direct Known Subclasses:
BoundingRectangleCollector.Edges
,BoundingRectangleCollector.Points
,BoundingRectangleCollector.Vertices
public abstract class BoundingRectangleCollector<T> extends Object
collects theRectangle2D
s that bound all of the elements of aGraph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BoundingRectangleCollector.Edges<V,E>
collects theRectangle2D
s that bound all of the edges of aGraph
static class
BoundingRectangleCollector.Points<V>
static class
BoundingRectangleCollector.Vertices<V>
collects theRectangle2D
s that bound all of the vertices of aGraph
-
Field Summary
Fields Modifier and Type Field Description protected LayoutModel
layoutModel
protected List<Rectangle2D>
rectangles
-
Constructor Summary
Constructors Constructor Description BoundingRectangleCollector(LayoutModel layoutModel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
compute()
abstract Rectangle2D
getForElement(T element)
abstract Rectangle2D
getForElement(T element, Point p)
abstract Rectangle2D
getForElement(T element, Point p1, Point p2)
List<Rectangle2D>
getRectangles()
-
-
-
Field Detail
-
layoutModel
protected LayoutModel layoutModel
-
rectangles
protected List<Rectangle2D> rectangles
-
-
Constructor Detail
-
BoundingRectangleCollector
public BoundingRectangleCollector(LayoutModel layoutModel)
-
-
Method Detail
-
getForElement
public abstract Rectangle2D getForElement(T element)
-
getForElement
public abstract Rectangle2D getForElement(T element, Point p)
-
getForElement
public abstract Rectangle2D getForElement(T element, Point p1, Point p2)
-
getRectangles
public List<Rectangle2D> getRectangles()
- Returns:
- the rectangles
-
compute
public void compute()
-
-