Package org.pushingpixels.substance.internal.ui

# Class SubstanceTableHeaderUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TableHeaderUI
javax.swing.plaf.basic.BasicTableHeaderUI
org.pushingpixels.substance.internal.ui.SubstanceTableHeaderUI

public class SubstanceTableHeaderUI extends BasicTableHeaderUI
UI for table headers in Substance look and feel.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`SubstanceTableHeaderUI.ColumnHeaderRepaintCallback`
Repaints a single column header during the fade animation cycle.
`protected static class`
`SubstanceTableHeaderUI.ScrollPaneCornerFiller`
Corner filler for tables wrapped in scroll panes.

## Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTableHeaderUI

`BasicTableHeaderUI.MouseInputHandler`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected TableCellRenderer`
`defaultHeaderRenderer`
The default renderer.
`protected Map<Integer,Object>`
`selectedIndices`
Holds the list of currently selected indices.
`protected ListSelectionListener`
`substanceFadeSelectionListener`
Listener for transition animations on list selections.
`protected org.pushingpixels.substance.internal.ui.SubstanceTableHeaderUI.TableHeaderListener`
`substanceHeaderListener`
Repaints the header on column selection.
`protected PropertyChangeListener`
`substancePropertyChangeListener`
Property change listener.

### Fields inherited from class javax.swing.plaf.basic.BasicTableHeaderUI

`header, mouseInputListener, rendererPane`

## Constructor Summary

Constructors
Constructor
Description
`SubstanceTableHeaderUI()`
Creates a new UI delegate.

## Method Summary

Modifier and Type
Method
Description
`static ComponentUI`
`createUI(JComponent comp)`
`ComponentState`
`getColumnState(int columnIndex)`
Returns the current state for the specified cell.
`protected static Color`
`getGridColor(JTableHeader header)`
Returns the grid color for the table header.
`StateTransitionTracker.ModelStateInfo`
`getModelStateInfo(int columnIndex)`
`JComponent`
`getScrollPaneCornerFiller()`
Returns the scroll pane corner filler component.
`StateTransitionTracker`
`getStateTransitionTracker(int columnIndex)`
`StateTransitionTracker`
`getTracker(int columnIndex, boolean initialRollover, boolean initialSelected)`
`protected void`
`installDefaults()`
`protected void`
`installListeners()`
`void`
`paint(Graphics g, JComponent c)`
`protected void`
`paintGrid(Graphics g, JComponent c)`
`void`
`processColumnModelChangeEvent(TableColumnModel oldModel, TableColumnModel newModel)`
Processes the events on model changes on the table column model.
`protected void`
`uninstallDefaults()`
`protected void`
`uninstallListeners()`
`void`
`uninstallUI(JComponent c)`
`void`
`update(Graphics g, JComponent c)`

### Methods inherited from class javax.swing.plaf.basic.BasicTableHeaderUI

`createMouseInputListener, getBaseline, getMaximumSize, getMinimumSize, getPreferredSize, getRolloverColumn, installKeyboardActions, installUI, rolloverColumnUpdated, uninstallKeyboardActions`

### Methods inherited from class javax.swing.plaf.ComponentUI

`contains, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### substanceHeaderListener

protected org.pushingpixels.substance.internal.ui.SubstanceTableHeaderUI.TableHeaderListener substanceHeaderListener
Repaints the header on column selection.

### defaultHeaderRenderer

protected TableCellRenderer defaultHeaderRenderer
The default renderer.

### selectedIndices

protected Map<Integer,Object> selectedIndices
Holds the list of currently selected indices.

### substanceFadeSelectionListener

protected ListSelectionListener substanceFadeSelectionListener
Listener for transition animations on list selections.

### substancePropertyChangeListener

protected PropertyChangeListener substancePropertyChangeListener
Property change listener.

## Constructor Details

### SubstanceTableHeaderUI

public SubstanceTableHeaderUI()
Creates a new UI delegate.

## Method Details

### createUI

public static ComponentUI createUI(JComponent comp)

### installListeners

protected void installListeners()

Overrides:
  `installListeners` in class `BasicTableHeaderUI`

### installDefaults

protected void installDefaults()

Overrides:
  `installDefaults` in class `BasicTableHeaderUI`

### uninstallListeners

protected void uninstallListeners()

Overrides:
  `uninstallListeners` in class `BasicTableHeaderUI`

### uninstallDefaults

protected void uninstallDefaults()

Overrides:
  `uninstallDefaults` in class `BasicTableHeaderUI`

### paint

public void paint(Graphics g, JComponent c)

Overrides:
  `paint` in class `BasicTableHeaderUI`

### paintGrid

protected void paintGrid(Graphics g, JComponent c)

Parameters:
  `g` -
  `c` -

### getGridColor

protected static Color getGridColor(JTableHeader header)
Returns the grid color for the table header.

Parameters:
  `header` - Table header.
Returns:
  Grid color.

### update

public void update(Graphics g, JComponent c)

Overrides:
  `update` in class `ComponentUI`

### uninstallUI

public void uninstallUI(JComponent c)

Overrides:
  `uninstallUI` in class `BasicTableHeaderUI`

### getColumnState

public ComponentState getColumnState(int columnIndex)
Returns the current state for the specified cell.

Parameters:
  `columnIndex` - Column index.
Returns:
  The current state for the specified column.

### getModelStateInfo

public StateTransitionTracker.ModelStateInfo getModelStateInfo(int columnIndex)

### getStateTransitionTracker

public StateTransitionTracker getStateTransitionTracker(int columnIndex)

### getScrollPaneCornerFiller

public JComponent getScrollPaneCornerFiller()
Returns the scroll pane corner filler component. This method is used in `SubstanceScrollPaneUI` to put a consistent filler for tables.

Returns:
  Scroll pane corner filler.

### processColumnModelChangeEvent

public void processColumnModelChangeEvent(TableColumnModel oldModel, TableColumnModel newModel)
Processes the events on model changes on the table column model.

Parameters:
  `oldModel` - Old column model.
  `newModel` - New column model.

### getTracker

public StateTransitionTracker getTracker(int columnIndex, boolean initialRollover, boolean initialSelected)