Module com.googlecode.lanterna
Interface TableCellRenderer<V>
- Type Parameters:
V
- Type of data in the table cells
- All Known Implementing Classes:
DefaultTableCellRenderer
public interface TableCellRenderer<V>
The main interface to implement when you need to customize the way table cells are drawn
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawCell
(Table<V> table, V cell, int columnIndex, int rowIndex, TextGUIGraphics textGUIGraphics) Called by the table when it's time to draw a cell, you can see how much size is available by checking the size of thetextGUIGraphics
.getPreferredSize
(Table<V> table, V cell, int columnIndex, int rowIndex) Called by the table when it wants to know how big a particular table cell should be
-
Method Details
-
getPreferredSize
Called by the table when it wants to know how big a particular table cell should be- Parameters:
table
- Table containing the cellcell
- Data stored in the cellcolumnIndex
- Column index of the cellrowIndex
- Row index of the cell- Returns:
- Size this renderer would like the cell to have
-
drawCell
void drawCell(Table<V> table, V cell, int columnIndex, int rowIndex, TextGUIGraphics textGUIGraphics) Called by the table when it's time to draw a cell, you can see how much size is available by checking the size of thetextGUIGraphics
. The top-left position of the graphics object is the top-left position of this cell.- Parameters:
table
- Table containing the cellcell
- Data stored in the cellcolumnIndex
- Column index of the cellrowIndex
- Row index of the celltextGUIGraphics
- Graphics object to draw with
-