Package ghidra.graph.viewer.layout
Class GridLocationMap<V,E>
java.lang.Object
ghidra.graph.viewer.layout.GridLocationMap<V,E>
- Type Parameters:
V
- the vertex typeE
- the edge type
An object that maps vertices to rows and columns and edges to their articulation points.
This class is essentially a container that allows layout algorithms to store results, which
can later be turned into layout positioning points. The integer point values in this
class are row, column grid values, starting at 0,0.
Note: the Point2D values for the edge articulations use x,y values that are row and
column index values, the same values as calling row(V)
and col(V)
.
After building the grid using this class, clients can call rows()
to get
high-order object that represent rows.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Updates each row within the grid such that it's x values are set to center the row in the grid.int
void
void
dispose()
getArticulations
(E edge) int
void
rows()
Returns the rows in this grid, sorted by index (index can be negative)void
void
setArticulations
(E edge, List<Point> articulations) toString()
Creates a string representation of this grid
-
Constructor Details
-
GridLocationMap
public GridLocationMap()
-
-
Method Details
-
setArticulations
-
getArticulations
-
row
-
col
-
set
-
row
-
col
-
rows
Returns the rows in this grid, sorted by index (index can be negative)- Returns:
- the rows in this grid
-
centerRows
public void centerRows()Updates each row within the grid such that it's x values are set to center the row in the grid. Each row will be updated so that all its columns start at zero. After that, each column will be centered in the grid. -
dispose
public void dispose() -
toString
-
toStringGrid
Creates a string representation of this grid- Returns:
- a string representation of this grid
-