Class RadianceStripingUtils
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.RadianceStripingUtils
-
public class RadianceStripingUtils extends java.lang.Object
This class is used to speed up the striping of lists, tables, trees and comboboxes that use Radiance default renderers. This class is for internal use only.
The usage is this:
- Call
setup(JComponent)
before starting painting the component cells. An example -RadianceTableUI.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 rendered, call
tearDown(JComponent)
.
- Call
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
EVEN_COLOR
Name of the client property that stores the background fill color of even rows.private static java.lang.String
ODD_COLOR
Name of the client property that stores the background fill color of odd rows.
-
Constructor Summary
Constructors Constructor Description RadianceStripingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
applyStripedBackground(javax.swing.JComponent component, int rowIndex, javax.swing.JComponent renderer)
Applies the striped background to the specified renderer.static void
setup(javax.swing.JComponent comp)
Sets up the specified component for the UI delegate striping.static void
tearDown(javax.swing.JComponent comp)
Cleans the component after the UI delegate striping is over.
-
-
-
Field Detail
-
ODD_COLOR
private static final java.lang.String ODD_COLOR
Name of the client property that stores the background fill color of odd rows. The value should be an instance ofColor
.- See Also:
- Constant Field Values
-
EVEN_COLOR
private static final java.lang.String EVEN_COLOR
Name of the client property that stores the background fill color of even rows. The value should be an instance ofColor
.- See Also:
- Constant Field Values
-
-
Method Detail
-
setup
public static void setup(javax.swing.JComponent comp)
Sets up the specified component for the UI delegate striping.- Parameters:
comp
- Component.
-
tearDown
public static void tearDown(javax.swing.JComponent comp)
Cleans the component after the UI delegate striping is over.- Parameters:
comp
- Component. Should be the same as passed tosetup(JComponent)
.
-
applyStripedBackground
public static void applyStripedBackground(javax.swing.JComponent component, int rowIndex, javax.swing.JComponent renderer)
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.
-
-