Package javax.swing.tree

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


            DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
            // model.nodeChanged(node);
           
            // The following line was included because of task i78481.
            // In Java 1.6 nodeChanged does not work correctly.
            model.nodeStructureChanged(node);
           
            descriptionLabel.setText(nodeInfo.getDescription());
            sizeLabel.setText(sizeString + nodeInfo.getSize());
        }
    }
View Full Code Here


            DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
            // model.nodeChanged(node);
           
            // The following line was included because of task i78481.
            // In Java 1.6 nodeChanged does not work correctly.
            model.nodeStructureChanged(node);
           
            descriptionLabel.setText(nodeInfo.getDescription());
            sizeLabel.setText(sizeString + nodeInfo.getSize());
        }
    }
View Full Code Here

      sshRoot.add(node);

    }
    DefaultTreeModel model = (DefaultTreeModel) getModel();
    model.nodeStructureChanged(sshRoot);
  }

  private void initPopup() {
    popupMenu = new JPopupMenu();
    projectSettings = new JMenuItem("Project settings");
View Full Code Here

        if (!fileList[i].isDirectory()
            && !fileList[i].getName().equals(
                JSimConstants.PROJECTCONFFILE))
          node.add(new ProjectEntryMutuableTreeNode(fileList[i]));
      DefaultTreeModel model = (DefaultTreeModel) getModel();
      model.nodeStructureChanged(node);
    } catch (Exception exc) {
      exc.printStackTrace();
    }

  }
View Full Code Here

    try {
      JSimMutuableTreeNode node = (JSimMutuableTreeNode) arg.getPath()
          .getLastPathComponent();
      node.createNodes(true);
      DefaultTreeModel model = (DefaultTreeModel) getModel();
      model.nodeStructureChanged(node);
    } catch (Exception exc) {
      System.out.println("Tree initialized");
    }

  }
View Full Code Here

      for (TreePath treePath : selectedNodes) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) treePath
            .getLastPathComponent();
        if (node instanceof JSimMutuableTreeNode) {
          ((JSimMutuableTreeNode) node).createNodes(true);
          model.nodeStructureChanged(node);
        } else
          this.setup();
      }
    } else if (es == delete) {
      for (TreePath treePath : selectedNodes) {
View Full Code Here

                rProject.getPath() + rProject.getName());
        if (entry != null) {
          rNode.setJSimNode(entry);
          rNode.createNodes(true);

          model.nodeStructureChanged(selectedNode);
          JSimLogic.getInstance().refreshSimpleRemoteTree();
        } else
          JSimLogic.getInstance().closeConnection(rProject);
      }
    } else if (es == closeProject) {
View Full Code Here

        RemoteProject rProject = rNode.getRemoteProject();
        JSimLogic.getInstance().closeConnection(rProject);
        rNode.removeAllChildren();
        rNode.setJSimNode(null);

        model.nodeStructureChanged(selectedNode);
        JSimLogic.getInstance().refreshSimpleRemoteTree();
      }
    } else if (es == projectSettings) {
      if (selectedNode instanceof RemoteProjectMutuableTreeNode) {
        JSimLogic.getInstance().showProjectSettingsDialog(
View Full Code Here

      if (selectedNode instanceof JSimMutuableTreeNode) {
        if(selectedNode.isLeaf()){
          selectedNode = (DefaultMutableTreeNode)selectedNode.getParent();
        }
        ((JSimMutuableTreeNode) selectedNode).createNodes(true);
        model.nodeStructureChanged(selectedNode);
      }
    } else if (es == killBackupFiles) {
      for (TreePath treePath : selectedNodes) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) treePath
            .getLastPathComponent();
View Full Code Here

              jNode.getProject());
          if(selectedNode.isLeaf()){
            selectedNode = (DefaultMutableTreeNode)selectedNode.getParent();
          }
          ((JSimMutuableTreeNode) selectedNode).createNodes(true);
          model.nodeStructureChanged(selectedNode);
        }
      }
     
    } else if (es == newFile) {
      if (selectedNode instanceof JSimMutuableTreeNode) {
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.