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

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

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

JTree.isVisible介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-outline

private boolean areTreePathsVisible(TreePath[] treePaths) {
  for (int i = 0; i < treePaths.length; i++) {
    if (!tree.isVisible(treePaths[i])) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui-api

private static void expandAll(JTree tree, TreePath parent) {
  TreeNode node = (TreeNode) parent.getLastPathComponent();
  if (node.isLeaf() && tree.isVisible(parent) == false) {
    tree.makeVisible(parent);
  } else {
    for (Enumeration en = node.children(); en.hasMoreElements();) {
      TreeNode child = (TreeNode) en.nextElement();
      expandAll(tree, parent.pathByAddingChild(child));
    }
  }
}

代码示例来源:origin: net.sf.jt400/jt400

/**
Indicates if the object is currently visible.

@param  object    The object.
@return true if the object is visible; false otherwise.
**/
  public boolean isVisible (VNode object)
  {
    if (object == null)
      throw new NullPointerException ("object");

    TreePath path = getPath (object);
    if (path != null)
    {                                                            //@B0A
      //@B0A - Swing 1.1 bug. JTree.isVisible() returns true
      // when the node isn't in the tree.
      if (tree_.getPathBounds(model_.getPath(object)) == null) //@B0A
      {                                                        //@B0A
       return false;                                          //@B0A
      }                                                        //@B0A
      return tree_.isVisible (path);
    }                                                            //@B0A
    else
      return false;
  }

代码示例来源: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());
}

代码示例来源:origin: gurkenlabs/litiengine

if (path == null || !this.tree.isVisible()) {
 return false;

代码示例来源:origin: net.sf.taverna.t2.ui-components/workflow-explorer

if (oldTree.isVisible(new TreePath(oldNode.getPath()))){
  newTree.makeVisible(new TreePath(newNode.getPath()));

相关文章

JTree类方法