Package diva.graph.layout
Interface LayoutTarget
-
- All Known Implementing Classes:
BasicLayoutTarget
public interface LayoutTargetThe basic set of information necessary to layout a graph: a mapping the graph data structure to aspects of its visual representation, a viewport to layout in, and some manipulation routines including pick, place, and route.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBounds(java.lang.Object node)Return the bounds of the figure associated with the given node in the target's view.GraphModelgetGraphModel()Return the graph model that provides a traversal interface to the graph I'm trying to layout.java.awt.geom.Rectangle2DgetViewport(java.lang.Object composite)Return the viewport of the given graph as a rectangle in logical coordinates.java.lang.ObjectgetVisualObject(java.lang.Object object)Return the visual object of the given graph object.java.util.IteratorintersectingEdges(java.awt.geom.Rectangle2D r)Return an iterator over nodes in the view which intersect the given rectangle.java.util.IteratorintersectingNodes(java.awt.geom.Rectangle2D r)Return an iterator over edges in the view which intersect the given rectangle.booleanisEdgeVisible(java.lang.Object edge)Return whether or not the given edge is actually visible in the view.booleanisNodeVisible(java.lang.Object node)Return whether or not the given node is actually visible in the view.voidroute(java.lang.Object edge)Route absolutely the figure associated with the given edge in the target's view.voidtranslate(java.lang.Object node, double dx, double dy)Translate the figure associated with the given node in the target's view by the given delta.
-
-
-
Method Detail
-
getBounds
java.awt.geom.Rectangle2D getBounds(java.lang.Object node)
Return the bounds of the figure associated with the given node in the target's view.
-
getGraphModel
GraphModel getGraphModel()
Return the graph model that provides a traversal interface to the graph I'm trying to layout.
-
getVisualObject
java.lang.Object getVisualObject(java.lang.Object object)
Return the visual object of the given graph object. Note that the purpose of a layout target is to abstract away the visual object and using this method breaks that abstraction.
-
getViewport
java.awt.geom.Rectangle2D getViewport(java.lang.Object composite)
Return the viewport of the given graph as a rectangle in logical coordinates.
-
isNodeVisible
boolean isNodeVisible(java.lang.Object node)
Return whether or not the given node is actually visible in the view.
-
isEdgeVisible
boolean isEdgeVisible(java.lang.Object edge)
Return whether or not the given edge is actually visible in the view.
-
intersectingNodes
java.util.Iterator intersectingNodes(java.awt.geom.Rectangle2D r)
Return an iterator over edges in the view which intersect the given rectangle.
-
intersectingEdges
java.util.Iterator intersectingEdges(java.awt.geom.Rectangle2D r)
Return an iterator over nodes in the view which intersect the given rectangle.
-
route
void route(java.lang.Object edge)
Route absolutely the figure associated with the given edge in the target's view.
-
translate
void translate(java.lang.Object node, double dx, double dy)Translate the figure associated with the given node in the target's view by the given delta.
-
-