Class ShadingColorHighlighter

  • All Implemented Interfaces:
    Highlighter

    public class ShadingColorHighlighter
    extends ColorHighlighter
    Experimental replacement of HierarchicalColumnHighligher. Darkens the component's background.
    Author:
    Jeanette Winzenburg
    • Constructor Detail

      • ShadingColorHighlighter

        public ShadingColorHighlighter()
        Instantiates a Highlighter with null colors using the default HighlightPredicate.
      • ShadingColorHighlighter

        public ShadingColorHighlighter​(HighlightPredicate predicate)
        Instantiates a Highlighter with null colors using the specified HighlightPredicate.
        Parameters:
        predicate - the HighlightPredicate to use.
    • Method Detail

      • applyBackground

        protected void applyBackground​(Component renderer,
                                       ComponentAdapter adapter)
        Applies a suitable background for the renderer component within the specified adapter.

        This implementation applies its a darkened background to an unselected adapter. Does nothing for selected cells.

        Overrides:
        applyBackground in class ColorHighlighter
        Parameters:
        renderer - the cell renderer component that is to be decorated
        adapter - the ComponentAdapter for this decorate operation
      • computeBackgroundSeed

        protected Color computeBackgroundSeed​(Color seed)