Class ViewportUtility
java.lang.Object
ghidra.framework.main.logviewer.ui.ViewportUtility
- All Implemented Interfaces:
Observer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height (in pixels) of the viewport.intReturns the number of rows that are visible in the viewport.intReturns the table row associated with the top of the viewport.booleanisInViewport(int row) Returns true if the given row is in the viewport.voidmoveViewportDown(int rows, boolean selection) Moves the viewport down the number of rows specified.voidSnaps the viewport to the bottom of the table.voidSnaps the viewport to the top of the table.voidmoveViewportUp(int rows, boolean selection) Moves the viewport up the number of rows specified.voidscrollViewportTo(int row) Moves the viewport (top) to the given row in the current view.voidsetModel(ChunkModel model) voidsetReader(ChunkReader reader) voidvoidsetViewport(JViewport viewport) voidupdate(Observable o, Object arg)
-
Constructor Details
-
ViewportUtility
-
-
Method Details
-
setViewport
- Parameters:
viewport-
-
setTable
- Parameters:
table-
-
setReader
- Parameters:
reader-
-
setModel
- Parameters:
model-
-
getHeight
public int getHeight()Returns the height (in pixels) of the viewport.- Returns:
-
getViewportPositionAsRow
public int getViewportPositionAsRow()Returns the table row associated with the top of the viewport.- Returns:
-
isInViewport
public boolean isInViewport(int row) Returns true if the given row is in the viewport.- Parameters:
row-- Returns:
-
moveViewportToBottom
public void moveViewportToBottom()Snaps the viewport to the bottom of the table. -
moveViewportToTop
public void moveViewportToTop()Snaps the viewport to the top of the table. -
getNumRowsInViewport
public int getNumRowsInViewport()Returns the number of rows that are visible in the viewport.- Returns:
-
scrollViewportTo
public void scrollViewportTo(int row) Moves the viewport (top) to the given row in the current view.- Parameters:
row-
-
moveViewportUp
public void moveViewportUp(int rows, boolean selection) Moves the viewport up the number of rows specified. If moving up puts he view above the bounds of the first-visible chunk, load a previous chunk.- Parameters:
rows-selection-
-
moveViewportDown
public void moveViewportDown(int rows, boolean selection) Moves the viewport down the number of rows specified. If moving down puts he view below the bounds of the first-visible chunk, load the next chunk.- Parameters:
rows-selection-
-
update
-