javax.swing.JTree.isShowing()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(152)

本文整理了Java中javax.swing.JTree.isShowing()方法的一些代码示例,展示了JTree.isShowing()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.isShowing()方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:isShowing

JTree.isShowing介绍

暂无

代码示例

代码示例来源:origin: aterai/java-swing-tips

@Override public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
  if (!tree.isShowing()) {
   return false;
  }
  Rectangle cellRect = tree.getPathBounds(path);
  if ((infoflags & (FRAMEBITS | ALLBITS)) != 0 && Objects.nonNull(cellRect)) {
   tree.repaint(cellRect);
  }
  return (infoflags & (ALLBITS | ABORT)) == 0;
 }
});

代码示例来源:origin: joel-costigliola/assertj-swing

/**
 * Returns the {@code String} representation of the given {@code Component}, which should be a {@code JTree} (or
 * subclass).
 *
 * @param c the given {@code Component}.
 * @return the {@code String} representation of the given {@code JTree}.
 */
@Override
@Nonnull protected String doFormat(@Nonnull Component c) {
 JTree tree = (JTree) c;
 String format = "%s[name=%s, selectionCount=%d, selectionPaths=%s, selectionMode=%s, enabled=%b, visible=%b, showing=%b";
 return String.format(format, getRealClassName(c), quote(tree.getName()), tree.getSelectionCount(),
            Arrays.format(selectionPaths(tree)), selectionMode(tree), tree.isEnabled(), tree.isVisible(),
            tree.isShowing());
}

相关文章

JTree类方法