Module com.googlecode.lanterna
Interface TableRenderer<V>
- All Superinterfaces:
ComponentRenderer<Table<V>>
,InteractableRenderer<Table<V>>
- All Known Implementing Classes:
DefaultTableRenderer
Formalized interactable renderer for tables
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawComponent
(TextGUIGraphics graphics, Table<V> component) Using the supplied graphics object, draws the component passed in.boolean
getPreferredSize
(Table<V> component) Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.int
Returns the index of the first visible column with the renderers current stateint
Returns the index of the first visible row with the renderers current stateint
Returns the number of rows visible in the table cell area on the last draw operationboolean
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.Methods inherited from interface com.googlecode.lanterna.gui2.InteractableRenderer
getCursorLocation
-
Method Details
-
drawComponent
Description copied from interface:ComponentRenderer
Using the supplied graphics object, draws the component passed in.- Specified by:
drawComponent
in interfaceComponentRenderer<V>
- Parameters:
graphics
- Graphics object to use for drawingcomponent
- Component to draw
-
getPreferredSize
Description copied from interface:ComponentRenderer
Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.- Specified by:
getPreferredSize
in interfaceComponentRenderer<V>
- Parameters:
component
- Component to calculate the preferred size of- Returns:
- The size this renderer would like the component to take up
-
isScrollBarsHidden
boolean isScrollBarsHidden() -
setScrollBarsHidden
void setScrollBarsHidden(boolean scrollBarsHidden) -
getVisibleRowsOnLastDraw
int getVisibleRowsOnLastDraw()Returns the number of rows visible in the table cell area on the last draw operation- Returns:
- The number of rows visible in the table cell area on the last draw operation
-
getViewTopRow
int getViewTopRow()Returns the index of the first visible row with the renderers current state- Returns:
- Index of the first visible row of the table
-
setViewTopRow
void setViewTopRow(int viewTopRow) Modifies which row is the first visible, this may be overwritten depending on the circumstances when drawing the table.- Parameters:
viewTopRow
- First row to be displayed when drawing the table
-
getViewLeftColumn
int getViewLeftColumn()Returns the index of the first visible column with the renderers current state- Returns:
- Index of the first visible column of the table
-
setViewLeftColumn
void setViewLeftColumn(int viewLeftColumn) Modifies which column is the first visible, this may be overwritten depending on the circumstances when drawing the table.- Parameters:
viewLeftColumn
- First column to be displayed when drawing the table
-
setAllowPartialColumn
void setAllowPartialColumn(boolean allowPartialColumn) - Parameters:
allowPartialColumn
- when not all columns fit on the screen, whether to render part of a column, or skip rendering that column entirely
-
getAllowPartialColumn
boolean getAllowPartialColumn()- See Also:
-