Package javax.swing

Examples of javax.swing.JTree.scrollPathToVisible()


                        }
                        if (tree != null) {
                            TreePath path = new TreePath(DisplayNode.this.getPath());
                            if (value) {
                                tree.expandPath(path);
                                tree.scrollPathToVisible(path);
                            }
                            else {
                                tree.collapsePath(path);
                            }
                        }
View Full Code Here


                        }
                        if (tree != null) {
                            TreePath path = new TreePath(DisplayNode.this.getPath());
                            if (value) {
                                tree.expandPath(path);
                                tree.scrollPathToVisible(path);
                            }
                            else {
                                tree.collapsePath(path);
                            }
                        }
View Full Code Here

        case SET_CURRENT:
            if (this._component instanceof JTree){
                if (this.value != null){
                    JTree jt = ((JTree)this._component);
                    jt.setSelectionPath(new TreePath(this.value));
                    jt.scrollPathToVisible(new TreePath(this.value));
                }
            } else if (this._component instanceof JListView) {
                ((JListView)this._component).setCurrentNode(this.value);
            } else if (this._component instanceof ListView){
                ((ListView)this._component).setCurrentNode(this.value);
View Full Code Here

                        }
                        if (tree != null) {
                            TreePath path = new TreePath(DisplayNode.this.getPath());
                            if (value) {
                                tree.expandPath(path);
                                tree.scrollPathToVisible(path);
                            }
                            else {
                                tree.collapsePath(path);
                            }
                        }
View Full Code Here

        case SET_CURRENT:
            if (this._component instanceof JTree){
                if (this.value != null){
                    JTree jt = ((JTree)this._component);
                    jt.setSelectionPath(new TreePath(this.value));
                    jt.scrollPathToVisible(new TreePath(this.value));
                }
            } else if (this._component instanceof JListView) {
                ((JListView)this._component).setCurrentNode(this.value);
            } else if (this._component instanceof ListView){
                ((ListView)this._component).setCurrentNode(this.value);
View Full Code Here

        case SET_CURRENT:
            if (this._component instanceof JTree){
                if (this.value != null){
                    JTree jt = ((JTree)this._component);
                    jt.setSelectionPath(new TreePath(this.value));
                    jt.scrollPathToVisible(new TreePath(this.value));
                }
            } else if (this._component instanceof JListView) {
                ((JListView)this._component).setCurrentNode(this.value);
            } else if (this._component instanceof ListView){
                ((ListView)this._component).setCurrentNode(this.value);
View Full Code Here

        if (tp == null) {
            return;
        }
        JTree tree = App.current().getFrame().tree();
        tree.setSelectionPath(tp);
        tree.scrollPathToVisible(tp);
    }

    public static TreePath getTreePath(String[] path) {
        JTree tree = App.current().getFrame().tree();
        AbstractTreeNode node = null;
View Full Code Here

              "Warning",
              JOptionPane.WARNING_MESSAGE);
      }
    }

    tree.scrollPathToVisible(path);
  }
      }
    }
  }
View Full Code Here

            Object last = path[vpath.size() - 1];
            path[vpath.size()] = model.getChild(last, index);
            TreePath selectionPath = new TreePath(path);
            tree.setSelectionPath(selectionPath);
            tree.makeVisible(selectionPath);
            tree.scrollPathToVisible(selectionPath);
        }
    }

    public void aboutToStart(Test suite, TestResult result) {
        treeBrowser.showTestTree(suite);
View Full Code Here

              "Warning",
              JOptionPane.WARNING_MESSAGE);
      }
    }

    tree.scrollPathToVisible(path);
  }
      }
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.