Class DefaultTableModel

    • Field Detail

      • listComponentModel

        protected MutableListModel listComponentModel
        The list component model.
      • columnComponentModel

        protected MutableColumnModel columnComponentModel
        The column component model.
      • uid

        protected java.util.UUID uid
        unique id related with this DefaultTableModel, it is used to generate key which we use to put and get values from cache:TABLE_VALUE_REQUEST_CACHE (i.e. when user has 2 tables on a screen we need to distinguish them)
    • Constructor Detail

      • DefaultTableModel

        public DefaultTableModel​(MutableListModel listComponentModel,
                                 MutableColumnModel columnComponentModel)
        Instantiates a new default table model.
        Parameters:
        listComponentModel - the list component model
        columnComponentModel - the column component model
    • Method Detail

      • setSelectedCell

        public void setSelectedCell​(int colIndex,
                                    int rowIndex)
        Description copied from interface: MutableTableModel
        Sets the selected cell.
        Specified by:
        setSelectedCell in interface MutableTableModel
        Parameters:
        colIndex - the col index
        rowIndex - the row index
      • setSelectedCells

        public void setSelectedCells​(java.util.List<java.lang.Integer> colIndexes,
                                     java.util.List<java.lang.Integer> rowIndexes)
        Description copied from interface: MutableTableModel
        Sets the selected cells.
        Specified by:
        setSelectedCells in interface MutableTableModel
        Parameters:
        colIndexes - the col indexes
        rowIndexes - the row indexes
      • getCellEditor

        public UIEditor getCellEditor​(int columnIndex,
                                      int rowIndex)
        Description copied from interface: TableModel
        Returns the editor associated with the cell at position (colIndex, rowIndex).
        Specified by:
        getCellEditor in interface TableModel
        Parameters:
        columnIndex - zero based column position index
        rowIndex - zero based row position index
        Returns:
        the cell's editor
        See Also:
        UIEditor
      • getValueAt

        public java.lang.Object getValueAt​(int colIndex,
                                           int rowIndex)
        Description copied from interface: TableModel
        Returns the value of the cell at position (colIndex, rowIndex).
        Specified by:
        getValueAt in interface TableModel
        Parameters:
        colIndex - zero based column position index
        rowIndex - zero based row position index
        Returns:
        the cell's value
      • checkUserEditPermission

        protected boolean checkUserEditPermission​(int colIndex,
                                                  int rowIndex)
        Check user edit permission.
        Parameters:
        colIndex - the col index
        rowIndex - the row index
        Returns:
        true, if successful
      • isCellEditable

        public boolean isCellEditable​(int colIndex,
                                      int rowIndex)
        Description copied from interface: TableModel
        Returns whether the cell at position (colIndex, rowIndex) can be edited or not.
        Specified by:
        isCellEditable in interface TableModel
        Parameters:
        colIndex - zero based column position index
        rowIndex - zero based row position index
        Returns:
        true if a cell exists at the specified position and is editable, false otherwise
      • isCellSelectable

        public boolean isCellSelectable​(int colIndex,
                                        int rowIndex)
        Description copied from interface: TableModel
        Returns whether the cell at position (colIndex, rowIndex) can be selected or not.
        Specified by:
        isCellSelectable in interface TableModel
        Parameters:
        colIndex - zero based column position index
        rowIndex - zero based row position index
        Returns:
        true if a cell exists at the specified position and is selectable, false otherwise
      • isCellSelected

        public boolean isCellSelected​(int colIndex,
                                      int rowIndex)
        Description copied from interface: TableModel
        Returns whether the cell at position (colIndex, rowIndex) is selected or not.
        Specified by:
        isCellSelected in interface TableModel
        Parameters:
        colIndex - zero based column position index
        rowIndex - zero based row position index
        Returns:
        true if a cell exists at the specified position and is selected, false otherwise
      • getNewInlineItemRenderer

        public CellRenderer getNewInlineItemRenderer​(int columnIndex)
        Description copied from interface: TableModel
        Gets the new inline item renderer.
        Specified by:
        getNewInlineItemRenderer in interface TableModel
        Parameters:
        columnIndex - the column index
        Returns:
        the new inline item render