Interface IMiniTable

All Known Implementing Classes:
MiniTableImpl, WListbox

public interface IMiniTable
UI Table interface
Author:
hengsin
  • Method Details

    • isCellEditable

      boolean isCellEditable(int row, int column)
      Is column editable
      Parameters:
      row -
      column -
      Returns:
      true if column is editable
    • getValueAt

      Object getValueAt(int row, int column)
      Get value at row and column
      Parameters:
      row -
      column -
      Returns:
      value at row and column
    • setValueAt

      void setValueAt(Object value, int row, int column)
      Set value at row and column
      Parameters:
      value -
      row -
      column -
    • convertColumnIndexToModel

      int convertColumnIndexToModel(int viewColumnIndex)
      Convert view column index to model index
      Parameters:
      viewColumnIndex -
      Returns:
      corresponding index at underlying model
    • setColumnReadOnly

      void setColumnReadOnly(int index, boolean readOnly)
      Change readonly attribute of a column
      Parameters:
      index -
      readOnly -
    • prepareTable

      String prepareTable(ColumnInfo[] layout, String from, String where, boolean multiSelection, String tableName)
      Prepare Table and return SQL to get resultset to populate table
      Parameters:
      layout -
      from -
      where -
      multiSelection -
      tableName -
      Returns:
      sql
    • addColumn

      void addColumn(String header)
      add column with header
      Parameters:
      header -
    • setColumnClass

      void setColumnClass(int index, Class<?> classType, boolean readOnly, String header)
      Set column class type
      Parameters:
      index -
      classType -
      readOnly -
      header -
    • setColumnClass

      void setColumnClass(int index, Class<?> classType, boolean readOnly)
      Set column class type
      Parameters:
      index -
      classType -
      readOnly -
    • loadTable

      void loadTable(ResultSet rs)
      Populate table from result set
      Parameters:
      rs -
    • loadTable

      void loadTable(PO[] pos)
      Populate table from POs
      Parameters:
      pos -
    • getSelectedRowKey

      <T extends Serializable> T getSelectedRowKey()
      Get row key of selected row
      Returns:
      row key
    • getSelectedRow

      int getSelectedRow()
      Get selected row index
      Returns:
      selected row index or -1 if no selected row
    • setRowCount

      void setRowCount(int rowCount)
      Ensure table has >= rowCount rows.
      i.e to grow a table by 1 row, call table.setRowCount(table.getRowCount()+1)
      Parameters:
      rowCount -
    • getLayoutInfo

      ColumnInfo[] getLayoutInfo()
      Get table column layout
      Returns:
      array of ColumnInfo
    • getColumnCount

      int getColumnCount()
      Get number of columns
      Returns:
      number of columns
    • getRowCount

      int getRowCount()
      Get number of rows
      Returns:
      number of rows
    • setMultiSelection

      void setMultiSelection(boolean multiSelection)
      Change multiple selection attribute of table
      Parameters:
      multiSelection -
    • isMultiSelection

      boolean isMultiSelection()
      Is multi selection turn on
      Returns:
      true if multi selection is turn on
    • getColorCode

      int getColorCode(int row)
      Get color code of row
      Parameters:
      row -
      Returns:
      color code
    • setColorCompare

      void setColorCompare(Object dataCompare)
      Set comparison object for determination of row color code
      Parameters:
      dataCompare -
    • repaint

      void repaint()
      Redraw the whole table
    • autoSize

      void autoSize()
      Auto size column width
    • setShowTotals

      void setShowTotals(boolean show)
      Change show total attribute of table
      Parameters:
      show -