Package 

Class DynamicTableModel


  • 
    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 int numRows
      private int numColumns
    • Method Summary

      Modifier and Type Method Description
      int getNumRows()
      void setNumRows(int numRows)
      int getNumColumns()
      void setNumColumns(int numColumns)
      DynamicTableModel.TableModelIterator getIterator(RectF tableRect, int totalElements)
      RectF getCellRect(RectF tableRect, int numElements) Calculates the dimensions of a single element of this table withtableRect representing the overall dimensions of the table.
      • Methods inherited from class com.androidplot.ui.TableModel

        getIterator, getOrder, setOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DynamicTableModel

        DynamicTableModel(int numColumns, int numRows)
        Convenience method.
      • DynamicTableModel

        DynamicTableModel(int numColumns, int numRows, TableOrder order)
    • Method Detail

      • 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