Class ContainerTable<M extends AbstractContainerManager,​C extends AbstractContainer>

    • Field Detail

      • m_ColumnWidthsSet

        protected boolean m_ColumnWidthsSet
        whether the column widths have been set already.
      • m_ManuallyResized

        protected boolean m_ManuallyResized
        whether a manual resize occurred.
    • Constructor Detail

      • ContainerTable

        public ContainerTable()
        Initializes the table with an empty model.
      • ContainerTable

        public ContainerTable​(ContainerModel<M,​C> model)
        Initializes the table with the given model.
        Parameters:
        model - the model to use
    • Method Detail

      • getActualIndex

        public int getActualIndex​(int index)
        Returns the actual index in the container manager of the specified container.
        Parameters:
        index - the index to convert
        Returns:
        the actual index as used by the container manager
      • getActualIndices

        public int[] getActualIndices​(int[] indices)
        Returns the actual indices in the container manager of the specified containers.
        Parameters:
        indices - the indices to convert
        Returns:
        the actual indices as used by the container manager
      • removeAllContainers

        public void removeAllContainers()
        Removes all containers from the table.
      • removeContainers

        public void removeContainers​(int[] indices)
        Removes the containers from the table.
        Parameters:
        indices - the indices in the table of the containers to remove; use null to remove all
      • setModel

        public void setModel​(TableModel value)
        Uses the given model.
        Overrides:
        setModel in class JTable
        Parameters:
        value - the model to use
      • updateColumnWidths

        protected void updateColumnWidths()
        Updates the column widths.
      • isColumnWidthsSet

        public boolean isColumnWidthsSet()
        Returns whether the column widths have been set.
        Returns:
        true if column widths set
      • isManuallyResized

        public boolean isManuallyResized()
        Returns whether the columns where manually resized.
        Returns:
        true if resized
      • invalidateColumnWidths

        public void invalidateColumnWidths()
        Invalidates the column widths and layout.
      • revalidate

        public void revalidate()
        Revalidates the table layout.
        Overrides:
        revalidate in class JComponent
      • getManager

        public M getManager()
        Returns the underlying manager.
        Returns:
        the manager, null if none available
      • tableChanged

        public void tableChanged​(TableModelEvent e)
        Invoked when this table's TableModel generates a TableModelEvent. The TableModelEvent should be constructed in the coordinate system of the model; the appropriate mapping to the view coordinate system is performed by this JTable when it receives the event.

        Application code will not use these methods explicitly, they are used internally by JTable.

        Note that as of 1.3, this method clears the selection, if any.

        Specified by:
        tableChanged in interface TableModelListener
        Overrides:
        tableChanged in class JTable
        Parameters:
        e - the event