Interface LayoutModel2D<V>
- Type Parameters:
V- the vertex type
- All Known Implementing Classes:
ListenableLayoutModel2D, MapLayoutModel2D
A general interface for the 2D layout model.
The layout model provides the necessary components to a
LayoutAlgorithm2D in order to
draw a graph. Its responsibility is to provide the available drawable area, to be able to store
and answer queries about vertex coordinates, and to allow someone to fix (make permanent) a
vertex location.-
Method Summary
Modifier and TypeMethodDescriptioncollect()Collect a map of all vertices locations.Get the last location of a particular vertex in the model.Get the drawable area of the model.booleanCheck whether a vertex is a fixed point.iterator()Get an iterator with all vertices' locations.Set the location of a vertex.voidsetDrawableArea(Box2D drawableArea) Set the drawable area of the model.voidSet a point as being a "fixed-point" or not.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
getDrawableArea
-
setDrawableArea
Set the drawable area of the model.- Parameters:
drawableArea- the drawable area to use
-
get
-
put
-
setFixed
Set a point as being a "fixed-point" or not. It is the model's responsibility to make sure that changing the coordinates of a fixed point by callingput(Object, Point2D)has no effect.- Parameters:
vertex- a vertexfixed- whether it is a fixed point or not.
-
isFixed
Check whether a vertex is a fixed point. It is the model's responsibility to make sure that changing the coordinates of a fixed point by callingput(Object, Point2D)has no effect.- Parameters:
vertex- the vertex- Returns:
- true if a fixed point, false otherwise
-
collect
-
iterator
Get an iterator with all vertices' locations. May return an empty iterator if the model does not store locations.
-