Class RadianceTableUI

    • Constructor Detail

      • RadianceTableUI

        protected RadianceTableUI()
        Creates a UI delegate for table.
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent comp)
      • installDefaults

        protected void installDefaults()
        Overrides:
        installDefaults in class javax.swing.plaf.basic.BasicTableUI
      • installRendererIfNecessary

        protected void installRendererIfNecessary​(java.lang.Class<?> clazz,
                                                  javax.swing.table.TableCellRenderer renderer)
        Installs Radiance-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​(java.lang.Class<?> clazz,
                                                javax.swing.table.TableCellEditor editor)
        Installs Radiance-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.
      • uninstallDefaults

        protected void uninstallDefaults()
        Overrides:
        uninstallDefaults in class javax.swing.plaf.basic.BasicTableUI
      • uninstallRendererIfNecessary

        protected void uninstallRendererIfNecessary​(java.lang.Class<?> clazz,
                                                    javax.swing.table.TableCellRenderer renderer)
        Uninstalls default Radiance renderers that were installed in installRendererIfNecessary(Class, TableCellRenderer).
        Parameters:
        clazz - Column class.
        renderer - Renderer to restore.
      • uninstallEditorIfNecessary

        protected void uninstallEditorIfNecessary​(java.lang.Class<?> clazz,
                                                  javax.swing.table.TableCellEditor editor)
        Uninstalls default Radiance editors that were installed in installEditorIfNecessary(Class, TableCellEditor).
        Parameters:
        clazz - Column class.
        editor - Editor to restore.
      • installListeners

        protected void installListeners()
        Overrides:
        installListeners in class javax.swing.plaf.basic.BasicTableUI
      • uninstallListeners

        protected void uninstallListeners()
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicTableUI
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Paint a representation of the table instance that was set in installUI().
        Overrides:
        paint in class javax.swing.plaf.basic.BasicTableUI
      • paintGrid

        protected void paintGrid​(java.awt.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.
      • hasTrailingVerticalGridLine

        private boolean hasTrailingVerticalGridLine​(javax.swing.table.TableColumnModel cm,
                                                    int column)
      • hasLeadingVerticalGridLine

        private boolean hasLeadingVerticalGridLine​(int column)
      • viewIndexForColumn

        private int viewIndexForColumn​(javax.swing.table.TableColumn aColumn)
      • paintCells

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

        protected void paintDraggedArea​(java.awt.Graphics g,
                                        int rMin,
                                        int rMax,
                                        javax.swing.table.TableColumn draggedColumn,
                                        int distance)
      • paintCell

        protected void paintCell​(java.awt.Graphics g,
                                 java.awt.Rectangle cellRect,
                                 java.awt.Rectangle highlightCellRect,
                                 int row,
                                 int column)
      • paintDropLines

        protected void paintDropLines​(java.awt.Graphics g)
      • getHDropLineRect

        private java.awt.Rectangle getHDropLineRect​(javax.swing.JTable.DropLocation loc)
      • getVDropLineRect

        private java.awt.Rectangle getVDropLineRect​(javax.swing.JTable.DropLocation loc)
      • extendRect

        private java.awt.Rectangle extendRect​(java.awt.Rectangle rect,
                                              boolean horizontal)
      • getId

        public RadianceTableUI.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.
      • getCellState

        public ComponentState getCellState​(RadianceTableUI.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.
      • update

        public void update​(java.awt.Graphics g,
                           javax.swing.JComponent c)
        Overrides:
        update in class javax.swing.plaf.ComponentUI
      • getCellRendererInsets

        public java.awt.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()
      • isRadianceDefaultRenderer

        private boolean isRadianceDefaultRenderer​(java.lang.Object instance)
      • isRadianceDefaultEditor

        private boolean isRadianceDefaultEditor​(javax.swing.table.TableCellEditor editor)
      • getCellRectangleForRepaint

        private java.awt.Rectangle getCellRectangleForRepaint​(int row,
                                                              int column)