ComponentRenderer<V>
, InteractableRenderer<Table<V>>
DefaultTableRenderer
public interface TableRenderer<V> extends InteractableRenderer<Table<V>>
Modifier and Type | Method | Description |
---|---|---|
void |
drawComponent(TextGUIGraphics graphics,
Table<V> component) |
Using the supplied graphics object, draws the component passed in.
|
boolean |
getAllowPartialColumn() |
|
TerminalSize |
getPreferredSize(Table<V> component) |
Given the supplied component, how large does this renderer want the component to be?
|
int |
getViewLeftColumn() |
Returns the index of the first visible column with the renderers current state
|
int |
getViewTopRow() |
Returns the index of the first visible row with the renderers current state
|
int |
getVisibleRowsOnLastDraw() |
Returns the number of rows visible in the table cell area on the last draw operation
|
boolean |
isScrollBarsHidden() |
|
void |
setAllowPartialColumn(boolean allowPartialColumn) |
|
void |
setScrollBarsHidden(boolean scrollBarsHidden) |
|
void |
setViewLeftColumn(int viewLeftColumn) |
Modifies which column is the first visible, this may be overwritten depending on the circumstances when drawing the
table.
|
void |
setViewTopRow(int viewTopRow) |
Modifies which row is the first visible, this may be overwritten depending on the circumstances when drawing the
table.
|
getCursorLocation
void drawComponent(TextGUIGraphics graphics, Table<V> component)
ComponentRenderer
drawComponent
in interface ComponentRenderer<V>
graphics
- Graphics object to use for drawingcomponent
- Component to drawTerminalSize getPreferredSize(Table<V> component)
ComponentRenderer
getPreferredSize
in interface ComponentRenderer<V>
component
- Component to calculate the preferred size ofboolean isScrollBarsHidden()
void setScrollBarsHidden(boolean scrollBarsHidden)
int getVisibleRowsOnLastDraw()
int getViewTopRow()
void setViewTopRow(int viewTopRow)
viewTopRow
- First row to be displayed when drawing the tableint getViewLeftColumn()
void setViewLeftColumn(int viewLeftColumn)
viewLeftColumn
- First column to be displayed when drawing the tablevoid setAllowPartialColumn(boolean allowPartialColumn)
allowPartialColumn
- when not all columns fit on the screen, whether to render part of a column, or skip rendering that column entirelyboolean getAllowPartialColumn()
setAllowPartialColumn(boolean)
Copyright © 2020. All rights reserved.