public class AlternateTreeRowPainter<E extends javax.swing.JTree,U extends WebTreeUI> extends AbstractPainter<E,U> implements ITreeRowPainter<E,U>
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
evenColor
Even rows background color.
|
protected java.awt.Color |
oddColor
Odd rows background color.
|
protected int |
row
Painted row index.
|
component, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
AlternateTreeRowPainter() |
| Modifier and Type | Method and Description |
|---|---|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
Paints visual data using component graphics context.
|
protected void |
paintRowBackground(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
java.awt.Color color)
Paints singled-colored row background.
|
void |
prepareToPaint(int row)
Prepares painter to pain tree row.
|
addPainterListener, b, borderChange, getBorders, getCompleteBorder, getPreferredSize, i, i, i, install, installPropertyChangeListener, isOpaque, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, propertyChange, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstall, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPainterListener, getBorders, getPreferredSize, install, isOpaque, removePainterListener, uninstallprotected int row
protected java.awt.Color oddColor
protected java.awt.Color evenColor
public void prepareToPaint(int row)
ITreeRowPainterprepareToPaint in interface ITreeRowPainter<E extends javax.swing.JTree,U extends WebTreeUI>row - painted row indexpublic void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
PainterIt is highly recommended to honor provided painting bounds to avoid painting issues. These bounds might be representing full component size or contain just a small portion of the component.
protected void paintRowBackground(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
java.awt.Color color)
g2d - graphics contextbounds - row boundscolor - background color