📄 jmtree.java.svn-base
字号:
package jm.framework.gui.module.jmtree ;
import java.awt.* ;
import javax.swing.* ;
import jm.framework.gui.module.jmtree.model.*;
public class JMTree
extends JTree
{
/**
*
*/
private static final long serialVersionUID = 4287079459436872933L;
Color selectionForeground = Color.white;
Color selectionBackground = Color.blue;
public JMTree() {
super();
}
public JMTree (JMTreeNode root)
{
super(root);
}
public void showAngledLine(boolean show)
{
if(show)
{
this.putClientProperty ( "JTree.lineStyle" , "Angled" ) ;
}
else
{
this.putClientProperty ( "JTree.lineStyle" , "None" ) ;
}
}
public void setSelectionForeground(Color fore)
{
if(fore!=null)
selectionForeground = fore;
}
public Color getSelectionForeground()
{
return selectionForeground ;
}
public void setSelectionBackground(Color back)
{
if(back!=null)
selectionBackground = back;
}
public Color getSelectionBackground()
{
return selectionBackground ;
}
public JMTreeNode getLastSelectedPathComponent(){
return (JMTreeNode)super.getLastSelectedPathComponent();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -