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 classSubstanceTableHeaderUI.ColumnHeaderRepaintCallbackRepaints a single column header during the fade animation cycle.protected static classSubstanceTableHeaderUI.ScrollPaneCornerFillerCorner 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 TableCellRendererdefaultHeaderRendererThe default renderer.protected Map<Integer,Object>selectedIndicesHolds the list of currently selected indices.protected ListSelectionListenersubstanceFadeSelectionListenerListener for transition animations on list selections.protected org.pushingpixels.substance.internal.ui.SubstanceTableHeaderUI.TableHeaderListenersubstanceHeaderListenerRepaints the header on column selection.protected PropertyChangeListenersubstancePropertyChangeListenerProperty 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUIcreateUI(JComponent comp)ComponentStategetColumnState(int columnIndex)Returns the current state for the specified cell.protected static ColorgetGridColor(JTableHeader header)Returns the grid color for the table header.StateTransitionTracker.ModelStateInfogetModelStateInfo(int columnIndex)JComponentgetScrollPaneCornerFiller()Returns the scroll pane corner filler component.StateTransitionTrackergetStateTransitionTracker(int columnIndex)StateTransitionTrackergetTracker(int columnIndex, boolean initialRollover, boolean initialSelected)protected voidinstallDefaults()protected voidinstallListeners()voidpaint(Graphics g, JComponent c)protected voidpaintGrid(Graphics g, JComponent c)voidprocessColumnModelChangeEvent(TableColumnModel oldModel, TableColumnModel newModel)Processes the events on model changes on the table column model.protected voiduninstallDefaults()protected voiduninstallListeners()voiduninstallUI(JComponent c)voidupdate(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
-
-
-
-
Field Detail
-
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.
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent comp)
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicTableHeaderUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicTableHeaderUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicTableHeaderUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classBasicTableHeaderUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicTableHeaderUI
-
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:
updatein classComponentUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUIin classBasicTableHeaderUI
-
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 inSubstanceScrollPaneUIto 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)
-
-