Interface ColumnModel

All Known Subinterfaces:
MutableColumnModel
All Known Implementing Classes:
AbstractColumnModel, DefaultColumnModel

public interface ColumnModel
A ColumnModel holds information about columns e.g. which columns are available, visible etc.
  • Method Details

    • addColumnModelListener

      void addColumnModelListener(ColumnModelListener listener)
      Registers listener with this column model.
      Parameters:
      listener - the ColumnModelListener to register
    • findColumn

      int findColumn(ColumnDescriptor colDescr)
      Returns the index of the column represented by colDescr or -1</code if it is not available or hidden.
      Parameters:
      colDescr - column which index should be retrieved
      Returns:
      the zero based position index of the column with the specified name
    • getCellEditor

      UIEditor getCellEditor(int columnIndex)
      Gets the cell editor.
      Parameters:
      columnIndex - the column index
      Returns:
      the cell editor
    • getCellRenderer

      CellRenderer getCellRenderer(int columnIndex)
      Gets the cell renderer.
      Parameters:
      columnIndex - the column index
      Returns:
      the cell renderer
    • getColumn

      ColumnDescriptor getColumn(int columnIndex) throws IndexOutOfBoundsException
      Returns the column with index columnIndex.
      Parameters:
      columnIndex - the zero based position index of column to be returned
      Returns:
      the column at position columnIndex
      Throws:
      IndexOutOfBoundsException - if there is no column with the specified index
      See Also:
    • getColumns

      List<ColumnDescriptor> getColumns()
      Returns all columns (visible and hidden) held by this model.
      Returns:
      all the columns held by this model
    • getColumnWidth

      String getColumnWidth(ColumnDescriptor colDescr)
      Gets the column width.
      Parameters:
      colDescr - the col descr
      Returns:
      the column width
    • getColumnWidth

      String getColumnWidth(ColumnDescriptor colDescr, Boolean returnDefault)
      Gets the column width.
      Parameters:
      colDescr - the col descr
      returnDefault - the return default
      Returns:
      the column width
    • getHiddenColumns

      List<ColumnDescriptor> getHiddenColumns()
      Returns all the columns which are currently marked as invisible.
      Returns:
      all the hidden columns
    • getHiddenLocalizedColumns

      List<ColumnDescriptor> getHiddenLocalizedColumns(ColumnDescriptor colDescr)
      Gets the hidden localized columns.
      Parameters:
      colDescr - the col descr
      Returns:
      the hidden localized columns
    • getLocalizedColumn

      ColumnDescriptor getLocalizedColumn(ColumnDescriptor colDescr, LanguageModel lang)
      Gets the localized column.
      Parameters:
      colDescr - the col descr
      lang - the lang
      Returns:
      the localized column
    • getMenuPopupBuilder

      ListViewMenuPopupBuilder getMenuPopupBuilder()
      Gets the menu popup builder which is responsible for building table header menu popups.
      Returns:
      the menu popup builder
    • getNewInlineItemRenderer

      CellRenderer getNewInlineItemRenderer(int columnIndex)
      Gets the new inline item renderer.
      Parameters:
      columnIndex - the column index
      Returns:
      the new inline item render
    • getPropertyDescriptor

      PropertyDescriptor getPropertyDescriptor(ColumnDescriptor colDescr)
      Gets the property descriptor.
      Parameters:
      colDescr - the col descr
      Returns:
      the property descriptor
    • getRootColumnGroup

      ColumnGroup getRootColumnGroup()
      Returns the root ColumnGroup i.e. the column group which holds all other groups and columns, held by this model.
      Returns:
      the root column group node held by this model
    • getSelectedIndex

      int getSelectedIndex()
      Returns the index of the currently selected column.
      Returns:
      zero based position index of the currently selected column
    • getSelectedIndexes

      List<Integer> getSelectedIndexes()
      Returns the indexes of the currently selected columns.
      Returns:
      a list containing zero based position indexes of the currently selected columns
    • getSortedByColumnIndex

      int getSortedByColumnIndex()
      Returns the index of the column by which values are currently sorted.
      Returns:
      zero based position index of the column by which values are currently sorted
      See Also:
    • getValueAt

      Object getValueAt(int columnIndex, TypedObject object)
      Returns the value of the specified object's cell.
      Parameters:
      columnIndex - zero based column position index of the cell which value is to be returned
      object - the object which cell's value is to be returned
      Returns:
      the value at
    • getVisibleColumn

      ColumnDescriptor getVisibleColumn(int columnIndex) throws IndexOutOfBoundsException
      Returns the visible column at position columnIndex.
      Parameters:
      columnIndex - the zero based position index of the visible column to be returned
      Returns:
      the visible column at position columnIndex
      Throws:
      IndexOutOfBoundsException - if there is no column at the specified position
      See Also:
    • getVisibleColumns

      List<ColumnDescriptor> getVisibleColumns()
      Returns all the columns which are currently marked as visible.
      Returns:
      all the visible columns
    • getVisibleLocalizedColumns

      List<ColumnDescriptor> getVisibleLocalizedColumns(ColumnDescriptor colDescr)
      Gets the visible localized columns.
      Parameters:
      colDescr - the col descr
      Returns:
      the visible localized columns
    • isColumnLocalized

      boolean isColumnLocalized(ColumnDescriptor colDescr)
      Checks if is column localized.
      Parameters:
      colDescr - the col descr
      Returns:
      true, if is column localized
    • isColumnSelected

      boolean isColumnSelected(int columnIndex)
      Returns whether the column with index columnIndex is selected or not.
      Parameters:
      columnIndex - zero based position index of the column which selection status is to be retrieved
      Returns:
      true if a column at position columnIndex exists and is marked as selected, false otherwise
    • isSortAscending

      boolean isSortAscending()
      Returns the sort order of the column by which values are currently sorted.
      Returns:
      true if the sort order is ascending, false otherwise
      See Also:
    • removeColumnModelListener

      void removeColumnModelListener(ColumnModelListener listener)
      Unregisters listener with this column model.
      Parameters:
      listener - the ColumnModelListener to unregister