Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeModel.reload()


            //now get the index of the selected node in the DefaultTreeModel
            int index = dtm.getIndexOfChild(node.getParent(), node);
            // if selected node is first, return (can't move it up)
            if (index < node.getParent().getChildCount() - 1) {
              dtm.insertNodeInto(node, (DefaultMutableTreeNode) node.getParent(), index + 1);   // move the node
              dtm.reload();
              for (int i = 0; i < tree.getRowCount(); i++) {
                tree.expandRow(i);
              }
              tree.getSelectionModel().setSelectionPath(new TreePath(node.getPath()));
              updateEngineModel();
View Full Code Here


            //now get the index of the selected node in the DefaultTreeModel
            int index = dtm.getIndexOfChild(node.getParent(), node);
            // if selected node is first, return (can't move it up)
            if (index != 0) {
              dtm.insertNodeInto(node, (DefaultMutableTreeNode) node.getParent(), index - 1);   // move the node
              dtm.reload();
              for (int i = 0; i < tree.getRowCount(); i++) {
                tree.expandRow(i);
              }
              tree.getSelectionModel().setSelectionPath(new TreePath(node.getPath()));
              updateEngineModel();
View Full Code Here

        getComponentSelection().addItem("Select API");
        read();
        CustomMutableTreeNode top = new CustomMutableTreeNode("");
        DefaultTreeModel model = (DefaultTreeModel) getExamplesTree().getModel();
        model.setRoot(top);
        model.reload(top);

        validateDialog();
    }

    @Override
View Full Code Here

    {
        final String item = (String) getComponentSelection().getSelectedItem();
        CustomMutableTreeNode top = new CustomMutableTreeNode("");
        DefaultTreeModel model = (DefaultTreeModel) getExamplesTree().getModel();
        model.setRoot(top);
        model.reload(top);
        if (item != null && !item.equals("Select API")) {

            AsposeExampleCallback callback = new AsposeExampleCallback(this,top);
            final ModalTaskImpl modalTask = new ModalTaskImpl(selectedProject, callback, "Please wait...");
            ProgressManager.getInstance().run(modalTask);
View Full Code Here

            AsposeExampleCallback callback = new AsposeExampleCallback(this,top);
            final ModalTaskImpl modalTask = new ModalTaskImpl(selectedProject, callback, "Please wait...");
            ProgressManager.getInstance().run(modalTask);
            top.setTopTreeNodeText(item);
            model.setRoot(top);
            model.reload(top);
            getExamplesTree().expandPath(new TreePath(top.getPath()));

            }
        validateDialog();
    }
View Full Code Here

            model.setRoot(nestObject(this, null, "<Root>", root));

        } else {
            model.setRoot(createIconEntry("database.png", ""));
        }
        model.reload();
    }

    public static DefaultMutableTreeNode nestObject(final ObjectExplorer explorer, DefaultMutableTreeNode node, String field, Object v) {
        if (v == null) return null;
View Full Code Here

    serviceExplorer.setCellRenderer(new MonitorTreeCellRenderer());

    serviceExplorer.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);

    model.reload();
  }

  public void attach(ActivityProcessor proc) {
    this.processor = proc;
  }
View Full Code Here

      }

      node.add(receiversNode);
    }

    model.reload();

    for (int i = 0; i < serviceExplorer.getRowCount(); i++) {
      serviceExplorer.expandRow(i);
    }
  }
View Full Code Here

/* 422 */     transactions.repaint();
/* 423 */     _dirs = new Vector();
/*     */
/* 425 */     DefaultTreeModel model = (DefaultTreeModel)transactions.getModel();
/*     */
/* 427 */     model.reload();
/*     */
/* 429 */     transactions.repaint();
/*     */
/* 431 */     scanningNode = null;
/*     */   }
View Full Code Here

/* 531 */       System.err.println(e);
/*     */     }
/*     */
/* 534 */     DefaultTreeModel model = (DefaultTreeModel)transactions.getModel();
/*     */
/* 536 */     model.reload();
/*     */
/* 538 */     transactions.repaint();
/*     */   }
/*     */
/*     */   private void startSweep()
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.