Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance.utils
Class SubstanceStripingUtils

    java.lang.Object
      org.jvnet.substance.utils.SubstanceStripingUtils

    public class SubstanceStripingUtils

extends java.lang.Object

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 its `paintCells`.
- The specific renderer should call `applyStripedBackground(JComponent, int, JComponent)`.
- After all cells have been renderered, call `tearDown(JComponent)`.

Author:
  Kirill Grouchnikov

Constructor Summary
`SubstanceStripingUtils()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SubstanceStripingUtils

    public SubstanceStripingUtils()

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 to `setup(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 to `setup(JComponent)`).
    `rowIndex` - Row index.
    `renderer` - Renderer component.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD