Class SubstanceStripingUtils
java.lang.Object
org.pushingpixels.substance.internal.utils.SubstanceStripingUtils
This class is used to speed up the striping of lists, tables, trees and comboboxes that use Substance default renderers. This class if for internal use only.
The usage is this:
- Call
setup(JComponent)
before starting painting the component cells. An example -SubstanceTableUI.paint(java.awt.Graphics, JComponent)
that should call this method prior to the call to itspaintCells
. - The specific renderer should call
applyStripedBackground(JComponent, int, JComponent)
. - After all cells have been renderered, call
tearDown(JComponent)
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyStripedBackground
(JComponent component, int rowIndex, JComponent renderer) Applies the striped background to the specified renderer.static void
setup
(JComponent comp) Sets up the specified component for the UI delegate striping.static void
tearDown
(JComponent comp) Cleans the component after the UI delegate striping is over.
-
Constructor Details
-
SubstanceStripingUtils
public SubstanceStripingUtils()
-
-
Method Details
-
setup
Sets up the specified component for the UI delegate striping.- Parameters:
comp
- Component.
-
tearDown
Cleans the component after the UI delegate striping is over.- Parameters:
comp
- Component. Should be the same as passed tosetup(JComponent)
.
-
applyStripedBackground
Applies the striped background to the specified renderer.- Parameters:
component
- Component (should be the same as passed tosetup(JComponent)
).rowIndex
- Row index.renderer
- Renderer component.
-