- 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.- Author:
- Dimitrios Michail
- 
Method SummaryModifier 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 java.lang.IterableforEach, spliterator
- 
Method Details- 
getDrawableAreaBox2D getDrawableArea()Get the drawable area of the model.- Returns:
- the drawable area of the model
 
- 
setDrawableAreaSet the drawable area of the model.- Parameters:
- drawableArea- the drawable area to use
 
- 
getGet the last location of a particular vertex in the model. May return null if the vertex has not been assigned a location or if the particular implementation does not store the coordinates.- Parameters:
- vertex- the graph vertex
- Returns:
- the last location of the vertex
 
- 
putSet the location of a vertex.- Parameters:
- vertex- the graph vertex
- point- the location
- Returns:
- the previous location or null if the vertex did not have a previous location or if the model does not store locations
 
- 
setFixedSet 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 vertex
- fixed- whether it is a fixed point or not.
 
- 
isFixedCheck 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
 
- 
collectCollect a map of all vertices locations. May return null if the model does not store locations.- Returns:
- a map with all the locations
 
- 
iteratorGet an iterator with all vertices' locations. May return an empty iterator if the model does not store locations.
 
-