@Override
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean selected, boolean expanded, boolean leaf, int row,
boolean hasFocus) {
TreeNode node = (TreeNode) value;
TreePath tp = new TreePath(getPath(node));
CheckedNode cn = nodesCheckingState.get(tp);
checkBox.setIcon(getIcon(value));
if (cn == null) {
return this;
}
checkBox.setSelected(cn.isSelected);
checkBox.setText(node.toString());
checkBox.setOpaque(cn.isSelected && cn.hasChildren && !cn.allChildrenSelected);
return this;
}
JCheckBoxTree.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Cognizant-Intelligent-Test-Scripter
作者:
评论列表
文章目录