本文整理了Java中javax.swing.JTree.isOpaque()
方法的一些代码示例,展示了JTree.isOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.isOpaque()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:isOpaque
暂无
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void paint(Graphics g, JComponent c) {
JTree tree = (JTree) c;
if(tree.isOpaque()){
g.setColor(tree.getBackground());
g.fillRect(0, 0, tree.getWidth(), tree.getHeight());
}
if (tree.getSelectionCount() > 0) {
g.setColor(ColorController.COR_DESTAQUE);
//@see http://ateraimemo.com/Swing/TreeRowSelection.html
for (int i : tree.getSelectionRows()) {
Rectangle r = tree.getRowBounds(i);
g.fillRect(0, r.y, tree.getWidth(), r.height);
}
}
super.paint(g, c);
if (tree.getLeadSelectionPath() != null) {
Rectangle r = tree.getRowBounds(getRowForPath(tree, tree.getLeadSelectionPath()));
g.setColor(tree.hasFocus() ? ColorController.FUNDO_MEDIO.brighter(): ColorController.FUNDO_MEDIO);
// g.drawRect(0, r.y, tree.getWidth() - 1, r.height - 1);
}
}
代码示例来源:origin: com.github.insubstantial/substance
|| !tree.isOpaque();
代码示例来源:origin: org.java.net.substance/substance
|| !tree.isOpaque();
内容来源于网络,如有侵权,请联系作者删除!