Class ViewportUtility
- java.lang.Object
- 
- ghidra.framework.main.logviewer.ui.ViewportUtility
 
- 
- All Implemented Interfaces:
- java.util.Observer
 
 public class ViewportUtility extends java.lang.Object implements java.util.Observer
- 
- 
Constructor SummaryConstructors Constructor Description ViewportUtility(FVEventListener eventListener)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHeight()Returns the height (in pixels) of the viewport.intgetNumRowsInViewport()Returns the number of rows that are visible in the viewport.intgetViewportPositionAsRow()Returns 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.voidmoveViewportToBottom()Snaps the viewport to the bottom of the table.voidmoveViewportToTop()Snaps 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)voidsetTable(FVTable table)voidsetViewport(javax.swing.JViewport viewport)voidupdate(java.util.Observable o, java.lang.Object arg)
 
- 
- 
- 
Constructor Detail- 
ViewportUtilitypublic ViewportUtility(FVEventListener eventListener) 
 
- 
 - 
Method Detail- 
setViewportpublic void setViewport(javax.swing.JViewport viewport) - Parameters:
- viewport-
 
 - 
setTablepublic void setTable(FVTable table) - Parameters:
- table-
 
 - 
setReaderpublic void setReader(ChunkReader reader) - Parameters:
- reader-
 
 - 
setModelpublic void setModel(ChunkModel model) - Parameters:
- model-
 
 - 
getHeightpublic int getHeight() Returns the height (in pixels) of the viewport.- Returns:
 
 - 
getViewportPositionAsRowpublic int getViewportPositionAsRow() Returns the table row associated with the top of the viewport.- Returns:
 
 - 
isInViewportpublic boolean isInViewport(int row) Returns true if the given row is in the viewport.- Parameters:
- row-
- Returns:
 
 - 
moveViewportToBottompublic void moveViewportToBottom() Snaps the viewport to the bottom of the table.
 - 
moveViewportToToppublic void moveViewportToTop() Snaps the viewport to the top of the table.
 - 
getNumRowsInViewportpublic int getNumRowsInViewport() Returns the number of rows that are visible in the viewport.- Returns:
 
 - 
scrollViewportTopublic void scrollViewportTo(int row) Moves the viewport (top) to the given row in the current view.- Parameters:
- row-
 
 - 
moveViewportUppublic 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-
 
 - 
moveViewportDownpublic 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-
 
 - 
updatepublic void update(java.util.Observable o, java.lang.Object arg)- Specified by:
- updatein interface- java.util.Observer
- Parameters:
- o-
- arg-
 
 
- 
 
-