![JAR search and dependency download from the Maven repository](/logo.png)
freeseawind.lf.basic.tree.LuckTreeUI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of littleluck Show documentation
Show all versions of littleluck Show documentation
Java Swing cross platform LookAndFeel
package freeseawind.lf.basic.tree;
import javax.swing.JComponent;
import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTreeUI;
import javax.swing.tree.TreeCellRenderer;
/**
* TreeUI实现类,设置组件为不完全透明
* Set components are not fully transparent
*
* See Also: {@link LuckTreeUIBundle}, {@link LuckTreeCellRenderer}
*
*
* @author freeseawind@github
* @version 1.0
*
*/
public class LuckTreeUI extends BasicTreeUI
{
public static ComponentUI createUI(JComponent x)
{
return new LuckTreeUI();
}
protected void installDefaults()
{
super.installDefaults();
LookAndFeel.installProperty(tree, "opaque", Boolean.FALSE);
}
/**
* 使用自定义TreeCellRenderer, 去除焦点边框绘制。
*
* Use custom TreeCellRenderer, the removal of the border to draw focus.
*/
protected TreeCellRenderer createDefaultCellRenderer()
{
return new LuckTreeCellRenderer();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy