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 theRectangle2Ds that bound all of the elements of aGraph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoundingRectangleCollector.Edges<V,E>collects theRectangle2Ds that bound all of the edges of aGraphstatic classBoundingRectangleCollector.Points<V>static classBoundingRectangleCollector.Vertices<V>collects theRectangle2Ds that bound all of the vertices of aGraph
-
Field Summary
Fields Modifier and Type Field Description protected LayoutModellayoutModelprotected 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 voidcompute()abstract Rectangle2DgetForElement(T element)abstract Rectangle2DgetForElement(T element, Point p)abstract Rectangle2DgetForElement(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()
-
-