org.jdesktop.swingx.decorator
Class HierarchicalColumnHighlighter

java.lang.Object
  extended by org.jdesktop.swingx.decorator.Highlighter
      extended by org.jdesktop.swingx.decorator.HierarchicalColumnHighlighter

public class HierarchicalColumnHighlighter
extends Highlighter

HierarchicalColumnHighlighter

Author:
Ramesh Gupta

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.decorator.Highlighter
Highlighter.UIHighlighter
 
Field Summary
 
Fields inherited from class org.jdesktop.swingx.decorator.Highlighter
changeEvent, immutable, ledgerBackground, listenerList, notePadBackground
 
Constructor Summary
HierarchicalColumnHighlighter()
           
HierarchicalColumnHighlighter(java.awt.Color background, java.awt.Color foreground)
           
 
Method Summary
protected  java.awt.Color computeBackground(java.awt.Component component, ComponentAdapter adapter)
          Computes a suitable background for the renderer component within the specified adapter and returns the computed color.
protected  java.awt.Color computeBackgroundSeed(java.awt.Color seed)
           
 java.awt.Color getForeground(java.awt.Component component, ComponentAdapter adapter)
           
 
Methods inherited from class org.jdesktop.swingx.decorator.Highlighter
addChangeListener, applyBackground, applyFont, applyForeground, computeForeground, computeSelectedBackground, computeSelectedForeground, doHighlight, fireStateChanged, getBackground, getChangeListeners, getForeground, getSelectedBackground, getSelectedForeground, highlight, isImmutable, removeChangeListener, setBackground, setForeground, setSelectedBackground, setSelectedForeground
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalColumnHighlighter

public HierarchicalColumnHighlighter()

HierarchicalColumnHighlighter

public HierarchicalColumnHighlighter(java.awt.Color background,
                                     java.awt.Color foreground)
Method Detail

computeBackground

protected java.awt.Color computeBackground(java.awt.Component component,
                                           ComponentAdapter adapter)
Description copied from class: Highlighter

Computes a suitable background for the renderer component within the specified adapter and returns the computed color. The computed color depends on two factors: (i) whether the background color for this Highlighter is null or not, and (ii) whether the cell identified by the specified adapter isSelected or not.

If the background color for this Highlighter is not null, this method starts with an initial value that is equal to that background color, and proceeds to check the selected state of the cell. Otherwise, it starts with the background color of the component whose cell is being rendererd (not the background color of the renderer component that was passed in), and proceeds to check the selected state of the cell.

If the cell identified by the specified adapter is selected, this method returns the value computed by computeSelectedBackground when passed the initial background color computed earlier. Otherwise, it simply returns the initial background color computed earlier.

Overrides:
computeBackground in class Highlighter
Parameters:
component - the cell renderer component that is to be decorated
adapter - the ComponentAdapter for this decorate operation
Returns:
a suitable background color for the specified component and adapter

getForeground

public java.awt.Color getForeground(java.awt.Component component,
                                    ComponentAdapter adapter)

computeBackgroundSeed

protected java.awt.Color computeBackgroundSeed(java.awt.Color seed)


Copyright © 2005 Sun Microsystems All Rights Reserved.