Class Table

All Implemented Interfaces:
Click

public class Table extends Container implements Click
  • Field Details

  • Constructor Details

    • Table

      public Table(int cellWidth, int cellHeight, int cols, int rows)
      Create a table with uniform cells.
    • Table

      public Table(int[] cellWidths, int cellHeight, int cols, int rows)
      Create a table with different widths per column.
  • Method Details

    • setBorder

      public void setBorder(boolean state)
      Overrides:
      setBorder in class Component
    • setSelectionMode

      public void setSelectionMode(int mode)
      Sets selection mode : SELECT_...
    • getSelectionMode

      public int getSelectionMode()
    • setHeader

      public void setHeader(boolean state)
    • getHeader

      public boolean getHeader()
    • html

      public String html()
      Description copied from class: Component
      Returns HTML to render component.
      Overrides:
      html in class Container
    • add

      public void add(Component comp, int x, int y)
    • add

      public void add(Component comp, int x, int y, int spanx, int spany)
    • addRow

      public void addRow()
    • addRow

      public void addRow(Component[] cmps)
    • addRow

      public void addRow(String[] strs)
    • addColumn

      public void addColumn()
    • addColumn

      public void addColumn(int width)
    • addColumn

      public void addColumn(Component[] cmps)
    • addColumn

      public void addColumn(String[] strs)
    • setTableSize

      public void setTableSize(int cols, int rows)
      Sets number of columns and rows.
    • remove

      public void remove(Component c)
      Overrides:
      remove in class Container
    • remove

      public Component remove(int x, int y)
    • removeRow

      public void removeRow(int row)
    • removeColumn

      public void removeColumn(int col)
    • removeAll

      public void removeAll()
      Overrides:
      removeAll in class Container
    • setSpans

      public void setSpans(int x, int y, int spanx, int spany)
    • get

      public Component get(int x, int y, boolean checkSpans)
    • getRows

      public int getRows()
    • getColumns

      public int getColumns()
    • getSelectedRow

      public int getSelectedRow()
    • getSelectedColumn

      public int getSelectedColumn()
    • onClick

      public void onClick(MouseEvent me, Component cmp)
      Specified by:
      onClick in interface Click