Module com.googlecode.lanterna
Interface TableRenderer<V>
-
- All Superinterfaces:
ComponentRenderer<Table<V>>,InteractableRenderer<Table<V>>
- All Known Implementing Classes:
DefaultTableRenderer
public interface TableRenderer<V> extends InteractableRenderer<Table<V>>
Formalized interactable renderer for tables
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddrawComponent(TextGUIGraphics graphics, Table<V> component)Using the supplied graphics object, draws the component passed in.booleangetAllowPartialColumn()TerminalSizegetPreferredSize(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.intgetViewLeftColumn()Returns the index of the first visible column with the renderers current stateintgetViewTopRow()Returns the index of the first visible row with the renderers current stateintgetVisibleRowsOnLastDraw()Returns the number of rows visible in the table cell area on the last draw operationbooleanisScrollBarsHidden()voidsetAllowPartialColumn(boolean allowPartialColumn)voidsetScrollBarsHidden(boolean scrollBarsHidden)voidsetViewLeftColumn(int viewLeftColumn)Modifies which column is the first visible, this may be overwritten depending on the circumstances when drawing the table.voidsetViewTopRow(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 Detail
-
drawComponent
void drawComponent(TextGUIGraphics graphics, Table<V> component)
Description copied from interface:ComponentRendererUsing the supplied graphics object, draws the component passed in.- Specified by:
drawComponentin interfaceComponentRenderer<V>- Parameters:
graphics- Graphics object to use for drawingcomponent- Component to draw
-
getPreferredSize
TerminalSize getPreferredSize(Table<V> component)
Description copied from interface:ComponentRendererGiven 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:
getPreferredSizein 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:
setAllowPartialColumn(boolean)
-
-