Interface IMiniTable

All Known Implementing Classes:
MiniTableImpl, WListbox

public interface IMiniTable
Author:
hengsin
  • Method Details

    • isCellEditable

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

      Object getValueAt(int row, int 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)
      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 required 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
      Parameters:
      rs -
    • loadTable

      void loadTable(PO[] pos)
      populate table
      Parameters:
      pos -
    • getSelectedRowKey

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

      int getSelectedRow()
      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 layout
      Returns:
      array of ColumnInfo
    • getColumnCount

      int getColumnCount()
      Returns:
      number of columns
    • getRowCount

      int getRowCount()
      Returns:
      number of rows
    • setMultiSelection

      void setMultiSelection(boolean multiSelection)
      change multi selection attribute of table
      Parameters:
      multiSelection -
    • isMultiSelection

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

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

      void setColorCompare(Object dataCompare)
      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 -