本文整理了Java中javax.swing.JTree.getBounds()
方法的一些代码示例,展示了JTree.getBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.getBounds()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:getBounds
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@Override
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds,
Insets insets, Rectangle bounds, TreePath path, int row,
boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) {
// see comment for paintVerticalPartOfLeg()
Rectangle rect = tree.getBounds();
rect.x = 0;
rect.y = 0;
super.paintHorizontalPartOfLeg(g, rect, insets, bounds, path, row,
isExpanded, hasBeenExpanded, isLeaf);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@Override
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds,
Insets insets, TreePath path) {
// if we restrict to the actual clip bounds then we will be trying to
// paint subparts of the line. But if we do that then we have no way
// of knowing that the overall line size hasn't changed. This means
// that paintLine() will keep thinking it is drawing differnet lines and
// it will look all choppy. So we just have to live with redrawing more
// than we have to so that the line painting stuff knows whether the
// overall line has changed or not.
Rectangle rect = tree.getBounds();
rect.x = 0;
rect.y = 0;
super.paintVerticalPartOfLeg(g, rect, insets, path);
}
代码示例来源:origin: org.zaproxy/zap
@Override
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
if (visibleRect.getY() < sitesTree.getBounds().getY()) {
return contextsTree.getScrollableUnitIncrement(visibleRect, orientation, direction);
}
return sitesTree.getScrollableUnitIncrement(visibleRect, orientation, direction);
}
代码示例来源:origin: de.sciss/jtreetable
protected void paintTree(Graphics g) {
Shape clip = g.getClip();
if (tree.getWidth() <= 0 || !clip.intersects(tree.getBounds()))
return;
内容来源于网络,如有侵权,请联系作者删除!