Package javax.swing.tree

Examples of javax.swing.tree.MutableTreeNode.children()


   */
  public void update() {
    if (!mDisableUpdate) {
      MutableTreeNode rootNode = (MutableTreeNode) this.getRoot();
      @SuppressWarnings("unchecked")
      Enumeration<DefaultMutableTreeNode> e = rootNode.children();
      while (e.hasMoreElements() && !mDisableUpdate) {
        DefaultMutableTreeNode n = e.nextElement();

        Object o = n.getUserObject();
        if (o instanceof Plugin) {
View Full Code Here


  public void refreshLocalPlatformName(String newName) {
    String oldName = localPlatformName;
    localPlatformName = newName;
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    Enumeration children = root.children();
    while (children.hasMoreElements()) {
      AgentTree.Node node = (AgentTree.Node) children.nextElement();
      String name = node.getName();
      if (name.equalsIgnoreCase(oldName)) {
        node.setName(newName);
View Full Code Here

  }

  public void clearLocalPlatform() {
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      AgentTree.Node folderNode = (AgentTree.Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        Enumeration containers = folderNode.children();
View Full Code Here

    ContainerNode node = new ContainerNode(containerName);
    node.setAddress(addr);
   
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      Node folderNode = (Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        model.insertNodeInto(node, folderNode, folderNode.getChildCount());
View Full Code Here

   */
  public void addContainerNode(ContainerNode node, String typeContainer, InetAddress addr) {
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    node.setType(typeContainer);
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      AgentTree.Node folderNode = (AgentTree.Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        model.insertNodeInto(node, folderNode, folderNode.getChildCount());
View Full Code Here

  }

  public void removeContainerNode(String nameNode) {
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      AgentTree.Node folderNode = (AgentTree.Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {//found the localplatform folder 
        Enumeration containers = folderNode.children();
View Full Code Here

  }

  public void addRemotePlatformsFolderNode() {
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    Enumeration children = root.children();

    boolean existing = false;

    while (children.hasMoreElements() & (!existing)) {
      AgentTree.Node node = (AgentTree.Node) children.nextElement();
View Full Code Here

   
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
   
    // Search for the folder of the local Platform
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      Node folderNode = (Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        // Search for the agent container 'containerName'
View Full Code Here

    node.setType(agentType);
    AgentTree.AgentNode nod = (AgentTree.AgentNode) node;
    nod.setAddress(agentAddress);
    nod.setState("Running");
    //search for the folder of the local Platform
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      AgentTree.Node folderNode = (AgentTree.Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        // Search for the agent container 'containerName'
View Full Code Here

  public void modifyAgentNode(String containerName, String agentName, String address, String state, String ownership) {
    AgentTreeModel model = getModel();
    MutableTreeNode root = (MutableTreeNode) model.getRoot();
    //search for the folder of the local Platform
    Enumeration folders = root.children();
    while (folders.hasMoreElements()) {
      AgentTree.Node folderNode = (AgentTree.Node) folders.nextElement();
      String folderName = folderNode.getName();
      if (folderName.equalsIgnoreCase(localPlatformName)) {
        // Search for the agent container 'containerName'
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.