Type Parameters:
C - the column identity
R - the row type
All Superinterfaces:
TethysUIComponent
All Known Implementing Classes:
TethysUICoreTableManager

public interface TethysUITableManager<C,R> extends TethysUIComponent
Tethys Table Manager.
  • Method Details

    • isEditable

      boolean isEditable()
      Is the table editable?
      Returns:
      true/false
    • setEditable

      TethysUITableManager<C,R> setEditable(boolean pEditable)
      Set the edit-ability of the table.
      Parameters:
      pEditable - true/false
      Returns:
      the table
    • requestFocus

      void requestFocus()
      RequestFocus.
    • doRePaintRowOnCommit

      boolean doRePaintRowOnCommit()
      do we rePaintRow on commit?
      Returns:
      true/false
    • setRepaintRowOnCommit

      TethysUITableManager<C,R> setRepaintRowOnCommit(boolean pRePaint)
      Set repaintRow on Commit.
      Parameters:
      pRePaint - the flag
      Returns:
      the table
    • setError

      TethysUITableManager<C,R> setError(BiPredicate<C,R> pError)
      Set the error predicate.
      Parameters:
      pError - the error predicate
      Returns:
      the table
    • isError

      boolean isError(C pId, R pRow)
      Is the cell in error?
      Parameters:
      pId - the column id
      pRow - the row
      Returns:
      true/false
    • setChanged

      TethysUITableManager<C,R> setChanged(BiPredicate<C,R> pChanged)
      Set the changed predicate.
      Parameters:
      pChanged - the changed predicate
      Returns:
      the table
    • isChanged

      boolean isChanged(C pId, R pRow)
      Is the cell changed?
      Parameters:
      pId - the column id
      pRow - the row
      Returns:
      true/false
    • setDisabled

      TethysUITableManager<C,R> setDisabled(Predicate<R> pDisabled)
      Set the disabled predicate.
      Parameters:
      pDisabled - the disabled predicate
      Returns:
      the table
    • isDisabled

      boolean isDisabled(R pRow)
      Is the row disabled?
      Parameters:
      pRow - the row
      Returns:
      true/false
    • setFilter

      TethysUITableManager<C,R> setFilter(Predicate<R> pFilter)
      Set the filter.
      Parameters:
      pFilter - the filter
      Returns:
      the table
    • setComparator

      TethysUITableManager<C,R> setComparator(Comparator<R> pComparator)
      Set the comparator.
      Parameters:
      pComparator - the comparator
      Returns:
      the table
    • setOnCommit

      Set the on-commit consumer.
      Parameters:
      pOnCommit - the consumer
      Returns:
      the table
    • setOnSelect

      Set the on-select consumer.
      Parameters:
      pOnSelect - the consumer
      Returns:
      the table
    • selectRow

      void selectRow(R pItem)
      Select a row.
      Parameters:
      pItem - the row to select
    • scrollSelectedToView

      void scrollSelectedToView()
      Scroll the selected item (if any) to view.
    • selectRowWithScroll

      void selectRowWithScroll(R pItem)
      Select a row and ensure that it is visible.
      Parameters:
      pItem - the row to select
    • setOnCellEditState

      TethysUITableManager<C,R> setOnCellEditState(Consumer<Boolean> pOnCellEditState)
      Set the on-cellEditState consumer.
      Parameters:
      pOnCellEditState - the consumer
      Returns:
      the table
    • setOnCommitError

      TethysUITableManager<C,R> setOnCommitError(Consumer<OceanusException> pOnCommitError)
      Set the on-commitError consumer.
      Parameters:
      pOnCommitError - the consumer
      Returns:
      the table
    • setOnValidateError

      TethysUITableManager<C,R> setOnValidateError(Consumer<String> pOnValidateError)
      Set the on-validateError consumer.
      Parameters:
      pOnValidateError - the consumer
      Returns:
      the tabke
    • getOnValidateError

      Consumer<String> getOnValidateError()
      obtain onValidateError consumer.
      Returns:
      the consumer
    • cancelEditing

      void cancelEditing()
      Cancel editing.
    • setItems

      void setItems(List<R> pItems)
      Set the table items.
      Parameters:
      pItems - the items
    • fireTableDataChanged

      void fireTableDataChanged()
      fire TableDataChanged.
    • itemIterator

      Iterator<R> itemIterator()
      Obtain an iterator over the unsorted items.
      Returns:
      the iterator.
    • viewIterator

      Iterator<R> viewIterator()
      Obtain an iterator over the sorted and filtered items.
      Returns:
      the iterator.
    • columnIterator

      Iterator<C> columnIterator()
      Obtain an iterator over the column ids.
      Returns:
      the iterator.
    • getColumn

      TethysUITableColumn<?,C,R> getColumn(C pId)
      Obtain the column for the id.
      Parameters:
      pId - the id of the column
      Returns:
      the table column
    • repaintColumn

      void repaintColumn(C pId)
      Repaint the column.
      Parameters:
      pId - the column id
    • declareStringColumn

      Declare string column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareCharArrayColumn

      TethysUITableColumn.TethysUITableCharArrayColumn<C,R> declareCharArrayColumn(C pId)
      Declare charArray column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareShortColumn

      Declare short column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareIntegerColumn

      Declare integer column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareLongColumn

      Declare long column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareRawDecimalColumn

      TethysUITableColumn.TethysUITableRawDecimalColumn<C,R> declareRawDecimalColumn(C pId)
      Declare rawDecimal column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareMoneyColumn

      Declare money column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declarePriceColumn

      Declare price column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareRateColumn

      Declare rate column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareUnitsColumn

      Declare units column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareRatioColumn

      Declare ratio column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareDateColumn

      Declare date column.
      Parameters:
      pId - the column id
      Returns:
      the column
    • declareScrollColumn

      <T> TethysUITableColumn.TethysUITableScrollColumn<T,C,R> declareScrollColumn(C pId, Class<T> pClazz)
      Declare scroll column.
      Type Parameters:
      T - the data type
      Parameters:
      pId - the column id
      pClazz - the column class
      Returns:
      the column
    • declareListColumn

      <T extends Comparable<? super T>> TethysUITableColumn.TethysUITableListColumn<T,C,R> declareListColumn(C pId, Class<T> pClazz)
      Declare list column.
      Type Parameters:
      T - the data type
      Parameters:
      pId - the column id
      pClazz - the data class
      Returns:
      the column
    • declareIconColumn

      <T> TethysUITableColumn.TethysUITableIconColumn<T,C,R> declareIconColumn(C pId, Class<T> pClazz)
      Declare icon column.
      Type Parameters:
      T - the data type
      Parameters:
      pId - the column id
      pClazz - the column class
      Returns:
      the column