Examples of scrollPathToVisible()


Examples of edu.mit.csail.sdg.alloy4.OurTree.scrollPathToVisible()

         tree.expandRow(i);
         if (lastElement!=null && last==null) {last=tree.getPathForRow(i); if (lastElement!=last.getLastPathComponent()) last=null;}
      }
      // Show the current element if found, else show the GENERAL OPTIONS
      if (last!=null) { zoom(lastElement); } else { last = tree.getPathForRow(0); zoom(GENERAL); }
      tree.scrollPathToVisible(last);
      tree.setSelectionPath(last);
      JScrollPane scroll = OurUtil.scrollpane(tree, Color.BLACK, Color.WHITE, new OurBorder(false, false, false, Util.onMac()));
      scroll.setAlignmentX(0f);
      scroll.getVerticalScrollBar().setUnitIncrement(50);
      removeAll();
View Full Code Here

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

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

Examples of javax.swing.JTree.scrollPathToVisible()

        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

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

Examples of javax.swing.JTree.scrollPathToVisible()

        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

Examples of javax.swing.JTree.scrollPathToVisible()

        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

Examples of javax.swing.JTree.scrollPathToVisible()

        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

Examples of javax.swing.JTree.scrollPathToVisible()

              "Warning",
              JOptionPane.WARNING_MESSAGE);
      }
    }

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

Examples of javax.swing.JTree.scrollPathToVisible()

            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
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.