Class DefaultColumnModel

    • Field Detail

    • Method Detail

      • setSelectedIndex

        public void setSelectedIndex​(int index)
        Description copied from interface: MutableColumnModel
        Sets the selected index.
        Parameters:
        index - the new selected index
      • setSelectedIndexDirectly

        public boolean setSelectedIndexDirectly​(int index)
        Description copied from interface: MutableColumnModel
        Sets the selected index directly.
        Parameters:
        index - the index
        Returns:
        true, if successful
      • setSelectedIndexes

        public void setSelectedIndexes​(java.util.List<java.lang.Integer> indexes)
        Description copied from interface: MutableColumnModel
        Sets the selected indexes.
        Parameters:
        indexes - the new selected indexes
      • setSelectedIndexesDirectly

        public boolean setSelectedIndexesDirectly​(java.util.List<java.lang.Integer> indexes)
        Description copied from interface: MutableColumnModel
        Sets the selected indexes directly.
        Parameters:
        indexes - the selected indexes
        Returns:
        true, if successful
      • setVisibleColumns

        public void setVisibleColumns​(java.util.List<ColumnDescriptor> columns,
                                      boolean force)
        Description copied from interface: MutableColumnModel
        Sets the visible columns.
        Parameters:
        columns - the vis cols
        force - the force
      • hideColumn

        public boolean hideColumn​(int columnIndex)
        Description copied from interface: MutableColumnModel
        Hide column.
        Parameters:
        columnIndex - the col index
        Returns:
        true, if successful
      • showColumn

        public boolean showColumn​(ColumnDescriptor column,
                                  java.lang.Integer colIndex)
        Description copied from interface: MutableColumnModel
        Show column.
        Parameters:
        column - the col descr
        colIndex - the col index
        Returns:
        true, if successful
      • showColumnDirectly

        protected boolean showColumnDirectly​(ColumnDescriptor column)
      • getPropertyDescriptor

        public PropertyDescriptor getPropertyDescriptor​(ColumnDescriptor colDescr)
        Returns the property descriptor for a specific column.
        Parameters:
        colDescr - the col descr
        Returns:
        the PropertyDescriptor which the column colDescr represents or null if the column does not represent a property column
      • moveColumn

        public boolean moveColumn​(int fromIndex,
                                  int toIndex)
        Description copied from interface: MutableColumnModel
        Move column.
        Parameters:
        fromIndex - the from index
        toIndex - the to index
        Returns:
        true, if successful
      • getSortedByColumnIndex

        public int getSortedByColumnIndex()
        Description copied from interface: ColumnModel
        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:
        ColumnModel.isSortAscending()
      • setSortedColumnIndex

        public void setSortedColumnIndex​(int columnIndex,
                                         boolean ascending)
        Description copied from interface: MutableColumnModel
        Sets the sorted column index.
        Parameters:
        columnIndex - the col index
        ascending - the ascending
      • setSortAscending

        public void setSortAscending​(boolean ascending)
        Description copied from interface: MutableColumnModel
        Sets the sort ascending.
        Parameters:
        ascending - the new sort ascending
      • isSortAscending

        public boolean isSortAscending()
        Description copied from interface: ColumnModel
        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:
        ColumnModel.getSortedByColumnIndex()
      • findColumn

        public int findColumn​(ColumnDescriptor colDescr)
        Description copied from interface: ColumnModel
        Returns the index of the column represented by colDescr or -1
        Parameters:
        colDescr - column which index should be retrieved
        Returns:
        the zero based position index of the column with the specified name
      • getColumn

        public ColumnDescriptor getColumn​(int columnIndex)
        Description copied from interface: ColumnModel
        Returns the column with index columnIndex.
        Parameters:
        columnIndex - the zero based position index of column to be returned
        Returns:
        the column at position columnIndex
        See Also:
        ColumnModel.getVisibleColumn(int)
      • getVisibleColumn

        public ColumnDescriptor getVisibleColumn​(int columnIndex)
        Description copied from interface: ColumnModel
        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
        See Also:
        ColumnModel.getColumn(int)
      • getColumns

        public java.util.List<ColumnDescriptor> getColumns()
        Description copied from interface: ColumnModel
        Returns all columns (visible and hidden) held by this model.
        Returns:
        all the columns held by this model
      • getRootColumnGroup

        public ColumnGroup getRootColumnGroup()
        Description copied from interface: ColumnModel
        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

        public int getSelectedIndex()
        Description copied from interface: ColumnModel
        Returns the index of the currently selected column.
        Returns:
        zero based position index of the currently selected column
      • getSelectedIndexes

        public java.util.List<java.lang.Integer> getSelectedIndexes()
        Description copied from interface: ColumnModel
        Returns the indexes of the currently selected columns.
        Returns:
        a list containing zero based position indexes of the currently selected columns
      • getVisibleColumns

        public java.util.List<ColumnDescriptor> getVisibleColumns()
        Description copied from interface: ColumnModel
        Returns all the columns which are currently marked as visible.
        Returns:
        all the visible columns
      • getHiddenColumns

        public java.util.List<ColumnDescriptor> getHiddenColumns()
        Description copied from interface: ColumnModel
        Returns all the columns which are currently marked as invisible.
        Returns:
        all the hidden columns
      • isColumnSelected

        public boolean isColumnSelected​(int columnIndex)
        Description copied from interface: ColumnModel
        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
      • getValueAt

        public java.lang.Object getValueAt​(int columnIndex,
                                           TypedObject object)
        Description copied from interface: ColumnModel
        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
      • getCellEditor

        public UIEditor getCellEditor​(int columnIndex)
        Description copied from interface: ColumnModel
        Gets the cell editor.
        Parameters:
        columnIndex - the column index
        Returns:
        the cell editor
      • getCellRenderer

        public CellRenderer getCellRenderer​(int columnIndex)
        Description copied from interface: ColumnModel
        Gets the cell renderer.
        Parameters:
        columnIndex - the column index
        Returns:
        the cell renderer
      • getNewInlineItemRenderer

        public CellRenderer getNewInlineItemRenderer​(int columnIndex)
        Description copied from interface: ColumnModel
        Gets the new inline item renderer.
        Parameters:
        columnIndex - the column index
        Returns:
        the new inline item render
      • addColumn

        public void addColumn​(ColumnConfiguration columnConfig,
                              DefaultColumnGroup group)
        Dynamically adds a column to the specified ColumnGroup group if the group exists.
        Parameters:
        columnConfig - the column to add
        group - the group to which the column is to be added
      • addColumnToRootGroup

        public ColumnDescriptor addColumnToRootGroup​(ColumnConfiguration columnConfig)
        Dynamically adds a column to the root group and returns newly created ColumnDescriptor.
        Parameters:
        columnConfig - the column config
        Returns:
        the column descriptor
      • addDynamicColumnToRootGroup

        public ColumnDescriptor addDynamicColumnToRootGroup​(ColumnConfiguration columnConfig)
        Dynamically adds a column to the root group, mark it as "dynamic" and returns newly created ColumnDescriptor.
        Parameters:
        columnConfig - the column config
        Returns:
        the column descriptor
      • addGroup

        public void addGroup​(ColumnGroup group,
                             DefaultColumnGroup parentGroup)
        Dynamically adds the group group to the specified group parentGroup if the parent group exists.
        Parameters:
        group - the group to add
        parentGroup - the parent group to which the group is to be added
      • getHiddenLocalizedColumns

        public java.util.List<ColumnDescriptor> getHiddenLocalizedColumns​(ColumnDescriptor colDescr)
        Description copied from interface: ColumnModel
        Gets the hidden localized columns.
        Parameters:
        colDescr - the col descr
        Returns:
        the hidden localized columns
      • getVisibleLocalizedColumns

        public java.util.List<ColumnDescriptor> getVisibleLocalizedColumns​(ColumnDescriptor colDescr)
        Description copied from interface: ColumnModel
        Gets the visible localized columns.
        Parameters:
        colDescr - the col descr
        Returns:
        the visible localized columns
      • isColumnLocalized

        public boolean isColumnLocalized​(ColumnDescriptor colDescr)
        Description copied from interface: ColumnModel
        Checks if is column localized.
        Parameters:
        colDescr - the col descr
        Returns:
        true, if is column localized
      • getLocalizedColumn

        public ColumnDescriptor getLocalizedColumn​(ColumnDescriptor colDescr,
                                                   LanguageModel language)
        Description copied from interface: ColumnModel
        Gets the localized column.
        Parameters:
        colDescr - the col descr
        language - the lang
        Returns:
        the localized column
      • getColumnWidth

        public java.lang.String getColumnWidth​(ColumnDescriptor colDescr)
        Description copied from interface: ColumnModel
        Gets the column width.
        Parameters:
        colDescr - the col descr
        Returns:
        the column width
      • getColumnWidth

        public java.lang.String getColumnWidth​(ColumnDescriptor colDescr,
                                               java.lang.Boolean returnDefault)
        Description copied from interface: ColumnModel
        Gets the column width.
        Parameters:
        colDescr - the col descr
        returnDefault - the return default
        Returns:
        the column width
      • updateConfiguration

        protected void updateConfiguration()
      • getMenuPopupBuilder

        public ListViewMenuPopupBuilder getMenuPopupBuilder()
        Description copied from interface: ColumnModel
        Gets the menu popup builder which is responsible for building table header menu popups.
        Returns:
        the menu popup builder
      • updateDynamicColumns

        public void updateDynamicColumns​(ListModel listModel)
        Description copied from interface: MutableColumnModel
        Update dynamic columns.
        Parameters:
        listModel - the list model