Package ghidra.graph.viewer.layout
Class Row<V>
java.lang.Object
ghidra.graph.viewer.layout.Row<V>
- Type Parameters:
V
- the vertex type
A row in a grid. This class stores its row index, its y offset and its height. The
y value is the layout space y value of a
Point2D
object. That is, unlike the
GridLocationMap
, the y value of this object is in layout space and not indexes
of a grid.
This class maintains a collection of vertices on this row, organized by column index. You
can get the column of a vertex from getColumn(V)
.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the column index for the given vertexint
Represents the range of columns in this row.int
Returns the largest column index in this rowint
getPaddedHeight
(boolean isCondensed) Returns the smallest column index in this rowgetVertex
(int column) Returns the vertex at the given column index or null if there is no vertex at that columnReturns all vertices in this row, sorted by column index (min to max).boolean
void
Sets the column index in this row for the given vertextoString()
-
Field Details
-
y
public int yThe layout y coordinate of the column -
height
public int height -
index
public int indexThe grid index of this row (0, 1...n) for the number of rows
-
-
Method Details
-
setColumn
Sets the column index in this row for the given vertex- Parameters:
v
- the vertexcol
- the column index
-
getColumn
Returns the column index for the given vertex- Parameters:
v
- the vertex- Returns:
- the column index for the given vertex
-
getVertex
Returns the vertex at the given column index or null if there is no vertex at that column- Parameters:
column
- the column index- Returns:
- the vertex
-
getColumnCount
public int getColumnCount()Represents the range of columns in this row. For this given row in a grid:0 1 2 3 4 5 6 - - v - v - -
the column count is 3--where the column range is 2-4, inclusive.Note: this differs from then number of vertices in this row, as the column count includes columns that have no vertex.
- Returns:
- the number of columns in this row, including empty columns between start and end
-
getStartColumn
Returns the smallest column index in this row- Returns:
- the smallest column index in this row
-
getEndColumn
public int getEndColumn()Returns the largest column index in this row- Returns:
- the largest column index in this row
-
getVertices
Returns all vertices in this row, sorted by column index (min to max).Note: the index of a vertex in the list does not match the column index. To get the column index for a vertex, call
getColumn(V)
.- Returns:
- all vertices in this row
-
getPaddedHeight
public int getPaddedHeight(boolean isCondensed) -
isInitialized
public boolean isInitialized() -
toString
-