com.jgoodies.looks.plastic
Class PlasticTreeUI
BasicTreeUI
com.jgoodies.looks.plastic.PlasticTreeUI
public final class PlasticTreeUI
extends BasicTreeUI
The JGoodies Plastic Look&Feel implementation of
TreeUI
.
It provides two line styles: angled dashed lines, or no lines at all.
By default, lines are drawn.
You can change the line style by setting a client property.
The property key and values are a subset of the values used
by the Metal L&F tree. To hide lines use one of the following:
JTree tree1 = new JTree();
tree1.putClientProperty("JTree.lineStyle", "None");
JTree tree2 = new JTree();
tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
Options.TREE_LINE_STYLE_NONE_VALUE);
Although lines are shown by default, you could code:
JTree tree1 = new JTree();
tree1.putClientProperty("JTree.lineStyle", "Angled");
JTree tree2 = new JTree();
tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
Options.TREE_LINE_STYLE_ANGLED_VALUE);
static ComponentUI | createUI(JComponent b)
|
protected void | drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
|
void | installUI(JComponent c)
|
protected void | paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
|
protected void | paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
|
void | uninstallUI(JComponent c)
|
createUI
public static ComponentUI createUI(JComponent b)
drawCentered
protected void drawCentered(Component c,
Graphics graphics,
Icon icon,
int x,
int y)
installUI
public void installUI(JComponent c)
paintHorizontalLine
protected void paintHorizontalLine(Graphics g,
JComponent c,
int y,
int left,
int right)
paintVerticalLine
protected void paintVerticalLine(Graphics g,
JComponent c,
int x,
int top,
int bottom)
uninstallUI
public void uninstallUI(JComponent c)
Copyright © 2001-2008 JGoodies Karsten Lentzsch. All Rights Reserved.