Class GTableColumnModel

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.ListSelectionListener, javax.swing.table.TableColumnModel

    public class GTableColumnModel
    extends java.lang.Object
    implements javax.swing.table.TableColumnModel, java.beans.PropertyChangeListener, javax.swing.event.ListSelectionListener
    • Field Detail

      • selectionModel

        protected javax.swing.ListSelectionModel selectionModel
    • Method Detail

      • getGTable

        protected GTable getGTable()
      • isVisible

        public boolean isVisible​(javax.swing.table.TableColumn column)
        Returns true if the given column is visible.
        Parameters:
        column - The column for which to check visibility.
        Returns:
        true if the given column is visible.
      • isVisible

        public boolean isVisible​(int modelIndex)
        Returns true if the column at the given index is visible. This call is handy when checking for visibility when dealing with model data that knows nothing about the hidden columns.
        Parameters:
        modelIndex - The column index for which to check visibility. This is the model's index and not the table's index.
        Returns:
        true if the given column is visible.
      • setVisible

        public void setVisible​(javax.swing.table.TableColumn column,
                               boolean visible)
      • addColumn

        public void addColumn​(javax.swing.table.TableColumn aColumn)
        Specified by:
        addColumn in interface javax.swing.table.TableColumnModel
      • addColumnModelListener

        public void addColumnModelListener​(javax.swing.event.TableColumnModelListener listener)
        Specified by:
        addColumnModelListener in interface javax.swing.table.TableColumnModel
      • getColumn

        public javax.swing.table.TableColumn getColumn​(int columnIndex)
        Specified by:
        getColumn in interface javax.swing.table.TableColumnModel
      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableColumnModel
      • getColumnIndex

        public int getColumnIndex​(java.lang.Object columnIdentifier)
        Specified by:
        getColumnIndex in interface javax.swing.table.TableColumnModel
      • getColumnIndexAtX

        public int getColumnIndexAtX​(int x)
        Specified by:
        getColumnIndexAtX in interface javax.swing.table.TableColumnModel
      • getColumnMargin

        public int getColumnMargin()
        Specified by:
        getColumnMargin in interface javax.swing.table.TableColumnModel
      • getColumnSelectionAllowed

        public boolean getColumnSelectionAllowed()
        Specified by:
        getColumnSelectionAllowed in interface javax.swing.table.TableColumnModel
      • getColumns

        public java.util.Enumeration<javax.swing.table.TableColumn> getColumns()
        Specified by:
        getColumns in interface javax.swing.table.TableColumnModel
      • getAllColumns

        public java.util.List<javax.swing.table.TableColumn> getAllColumns()
        This returns all columns known by this model, both visible and not seen.
        Returns:
        all columns known by this model, both visible and not seen.
      • getSelectedColumnCount

        public int getSelectedColumnCount()
        Specified by:
        getSelectedColumnCount in interface javax.swing.table.TableColumnModel
      • getSelectedColumns

        public int[] getSelectedColumns()
        Specified by:
        getSelectedColumns in interface javax.swing.table.TableColumnModel
      • getSelectionModel

        public javax.swing.ListSelectionModel getSelectionModel()
        Specified by:
        getSelectionModel in interface javax.swing.table.TableColumnModel
      • getTotalColumnWidth

        public int getTotalColumnWidth()
        Specified by:
        getTotalColumnWidth in interface javax.swing.table.TableColumnModel
      • moveColumn

        public void moveColumn​(int columnIndex,
                               int newIndex)
        Specified by:
        moveColumn in interface javax.swing.table.TableColumnModel
      • removeColumn

        public void removeColumn​(javax.swing.table.TableColumn column)
        Specified by:
        removeColumn in interface javax.swing.table.TableColumnModel
      • removeColumnModelListener

        public void removeColumnModelListener​(javax.swing.event.TableColumnModelListener listener)
        Specified by:
        removeColumnModelListener in interface javax.swing.table.TableColumnModel
      • setColumnMargin

        public void setColumnMargin​(int newMargin)
        Specified by:
        setColumnMargin in interface javax.swing.table.TableColumnModel
      • setColumnSelectionAllowed

        public void setColumnSelectionAllowed​(boolean flag)
        Specified by:
        setColumnSelectionAllowed in interface javax.swing.table.TableColumnModel
      • setSelectionModel

        public void setSelectionModel​(javax.swing.ListSelectionModel newModel)
        Specified by:
        setSelectionModel in interface javax.swing.table.TableColumnModel
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent evt)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • valueChanged

        public void valueChanged​(javax.swing.event.ListSelectionEvent e)
        Specified by:
        valueChanged in interface javax.swing.event.ListSelectionListener
      • saveToXML

        public org.jdom.Element saveToXML()
      • restoreFromXML

        public void restoreFromXML​(org.jdom.Element element)