Package ghidra.graph.viewer.layout
Class GridLocationMap<V,E>
- java.lang.Object
- 
- ghidra.graph.viewer.layout.GridLocationMap<V,E>
 
- 
- Type Parameters:
- V- the vertex type
- E- the edge type
 
 public class GridLocationMap<V,E> extends java.lang.ObjectAn 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)andcol(V).After building the grid using this class, clients can call rows()to get high-order object that represent rows.
- 
- 
Constructor SummaryConstructors Constructor Description GridLocationMap()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcenterRows()Updates each row within the grid such that it's x values are set to center the row in the grid.intcol(V vertex)voidcol(V vertex, int col)voiddispose()java.util.List<java.awt.Point>getArticulations(E edge)introw(V vertex)voidrow(V vertex, int row)java.util.List<Row<V>>rows()Returns the rows in this grid, sorted by index (index can be negative)voidset(V v, int row, int col)voidsetArticulations(E edge, java.util.List<java.awt.Point> articulations)java.lang.StringtoString()java.lang.StringtoStringGrid()Creates a string representation of this grid
 
- 
- 
- 
Method Detail- 
setArticulationspublic void setArticulations(E edge, java.util.List<java.awt.Point> articulations) 
 - 
getArticulationspublic java.util.List<java.awt.Point> getArticulations(E edge) 
 - 
rowpublic void row(V vertex, int row) 
 - 
colpublic void col(V vertex, int col) 
 - 
setpublic void set(V v, int row, int col) 
 - 
rowpublic int row(V vertex) 
 - 
colpublic int col(V vertex) 
 - 
rowspublic java.util.List<Row<V>> rows() Returns the rows in this grid, sorted by index (index can be negative)- Returns:
- the rows in this grid
 
 - 
centerRowspublic 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.
 - 
disposepublic void dispose() 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringGridpublic java.lang.String toStringGrid() Creates a string representation of this grid- Returns:
- a string representation of this grid
 
 
- 
 
-