-
public class DynamicTableModel extends TableModel
Encapsulates the visual aspects of a table; number of rows and columns and the height and width in pixels of each element within the table. There is no support (yet) for variable size cells within a table; all cells within a table share the same dimensions. The DynamicTableModel provides an Iterator implementation which returns a RectF of each subsequent cell, based on the order of the plot. Tables with an order of COLUMN_MAJOR are traversed left to right column by column until the end of the row is reached, then proceeding to the next row. Tables with an order of ROW_MAJOR are traversed top to bottom row by row until the end of the row is reached, then proceeding to the next column.
-
-
Field Summary
Fields Modifier and Type Field Description private intnumRowsprivate intnumColumns
-
Constructor Summary
Constructors Constructor Description DynamicTableModel(int numColumns, int numRows)Convenience method. DynamicTableModel(int numColumns, int numRows, TableOrder order)
-
Method Summary
Modifier and Type Method Description intgetNumRows()voidsetNumRows(int numRows)intgetNumColumns()voidsetNumColumns(int numColumns)DynamicTableModel.TableModelIteratorgetIterator(RectF tableRect, int totalElements)RectFgetCellRect(RectF tableRect, int numElements)Calculates the dimensions of a single element of this table withtableRect representing the overall dimensions of the table. -
-
Constructor Detail
-
DynamicTableModel
DynamicTableModel(int numColumns, int numRows)
Convenience method.
-
DynamicTableModel
DynamicTableModel(int numColumns, int numRows, TableOrder order)
-
-
Method Detail
-
getNumRows
int getNumRows()
-
setNumRows
void setNumRows(int numRows)
-
getNumColumns
int getNumColumns()
-
setNumColumns
void setNumColumns(int numColumns)
-
getIterator
DynamicTableModel.TableModelIterator getIterator(RectF tableRect, int totalElements)
-
getCellRect
RectF getCellRect(RectF tableRect, int numElements)
Calculates the dimensions of a single element of this table withtableRect representing the overall dimensions of the table.
- Parameters:
tableRect- Dimensions/position of the table
-
-
-
-