Class SubstanceTableUI

    • Field Detail

      • rolledOverColumn

        protected int rolledOverColumn
        Holds the currently rolled-over column index, or -1 if none such. This is used for the table header animations.
      • substancePropertyChangeListener

        protected PropertyChangeListener substancePropertyChangeListener
        Listener that listens to changes on table properties.
      • substanceFadeRolloverListener

        protected org.pushingpixels.substance.internal.ui.SubstanceTableUI.RolloverFadeListener substanceFadeRolloverListener
        Listener for transition animations on table rollovers.
      • substanceFocusListener

        protected FocusListener substanceFocusListener
      • drawLeadingVerticalLine

        protected Boolean drawLeadingVerticalLine
      • drawTrailingVerticalLine

        protected Boolean drawTrailingVerticalLine
    • Constructor Detail

      • SubstanceTableUI

        public SubstanceTableUI()
        Creates a UI delegate for table.
    • Method Detail

      • installRendererIfNecessary

        protected void installRendererIfNecessary​(Class<?> clazz,
                                                  TableCellRenderer renderer)
        Installs Substance-specific renderers for column classes that don't have application-specific renderers installed by the user code.
        Parameters:
        clazz - Column class.
        renderer - Default renderer for the specified column class.
      • installEditorIfNecessary

        protected void installEditorIfNecessary​(Class<?> clazz,
                                                TableCellEditor editor)
        Installs Substance-specific renderers for column classes that don't have application-specific renderers installed by the user code.
        Parameters:
        clazz - Column class.
        editor - Default renderer for the specified column class.
      • paintGrid

        protected void paintGrid​(Graphics g,
                                 int rMin,
                                 int rMax,
                                 int cMin,
                                 int cMax)
        Paints the grid lines within aRect, using the grid color set with setGridColor. Paints vertical lines if getShowVerticalLines() returns true and paints horizontal lines if getShowHorizontalLines() returns true.
      • paintCells

        protected void paintCells​(Graphics g,
                                  int rMin,
                                  int rMax,
                                  int cMin,
                                  int cMax)
      • paintDraggedArea

        protected void paintDraggedArea​(Graphics g,
                                        int rMin,
                                        int rMax,
                                        TableColumn draggedColumn,
                                        int distance)
      • paintDropLines

        protected void paintDropLines​(Graphics g)
      • getId

        public SubstanceTableUI.TableCellId getId​(int row,
                                                  int column)
        Returns a comparable ID for the specified location.
        Parameters:
        row - Row index.
        column - Column index.
        Returns:
        Comparable ID for the specified location.
      • syncSelection

        protected void syncSelection​(boolean enforceNoAnimations)
        Synchronizes the current selection state.
        Parameters:
        enforceNoAnimations - Whether to force no animations.
      • getCellState

        public ComponentState getCellState​(SubstanceTableUI.TableCellId cellIndex)
        Returns the current state for the specified cell.
        Parameters:
        cellIndex - Cell index.
        Returns:
        The current state for the specified cell.
      • _hasAnimations

        protected boolean _hasAnimations()
        Checks whether the table has animations.
        Returns:
        true if the table has animations, false otherwise.
      • _hasSelectionAnimations

        protected boolean _hasSelectionAnimations()
        Checks whether the table has selection animations.
        Returns:
        true if the table has selection animations, false otherwise.
      • _hasRolloverAnimations

        protected boolean _hasRolloverAnimations()
        Checks whether the table has rollover animations.
        Returns:
        true if the table has rollover animations, false otherwise.
      • getRolloverColumnIndex

        public int getRolloverColumnIndex()
        Returns the index of the rollover column.
        Returns:
        The index of the rollover column.
      • isFocusedCell

        public boolean isFocusedCell​(int row,
                                     int column)
        Returns indication whether the specified cell has focus.
        Parameters:
        row - Cell row index.
        column - Cell column index.
        Returns:
        true If the focus is on the specified cell, false otherwise.
      • getCellRendererInsets

        public Insets getCellRendererInsets()
        Returns the cell renderer insets of this table. Is for internal use only.
        Returns:
        The cell renderer insets of this table.
      • hasSelectionAnimations

        public boolean hasSelectionAnimations()
      • hasRolloverAnimations

        public boolean hasRolloverAnimations()