com.jgoodies.looks.plastic

Class 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);
 

Version: $Revision: 1.3 $

Author: Karsten Lentzsch

Method Summary
static ComponentUIcreateUI(JComponent b)
protected voiddrawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
voidinstallUI(JComponent c)
protected voidpaintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
protected voidpaintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
voiduninstallUI(JComponent c)

Method Detail

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-2007 JGoodies Karsten Lentzsch. All Rights Reserved.