Package org.jamesii.gui.server.view.util

Examples of org.jamesii.gui.server.view.util.UserMutableTreeNode


     * @param si
     *          the si
     * @return the default mutable tree node
     */
    public static UserMutableTreeNode serviceInfoToNode(ServiceInfo si) {
      UserMutableTreeNode node2;
      node2 =
          new UserMutableTreeNode(new NodeInfo<>(String.format(
              "<html><b>%s</b> <i> %s</i></html>", si.getName(),
              si.getDescription()), si));

      node2.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
          "<html><b>Concurrent jobs: </b> <i> %d</i></html>",
          si.getConcurrent()), si)));

      node2.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
          "<html><b>Host address: </b> <i> %s</i></html>", si.getHostAddress()
              .getHostAddress()), si)));

      node2.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
          "<html><b>Host name: </b> <i> %s</i></html>", si.getHostAddress()
              .getHostName()), si)));

      return node2;
    }
View Full Code Here


      }

      DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) getRoot();

      // otherwise add the type node
      UserMutableTreeNode node;

      insertNodeInto(
          node =
              new UserMutableTreeNode(String.format("<html><b>%s</b> </html>",
                  st)), rootNode, 0);

      // remember the service type root node
      typeMapping.put(st.toString(), node);
View Full Code Here

          removeNodeFromParent(typeNode);
        }
      } else {
        // add
        // let's add the new service
        UserMutableTreeNode nameNode = ServiceTreeModel.serviceInfoToNode(info);

        serviceMapping.put(info.getLocalID(), nameNode);
        insertNodeInto(nameNode, typeNode, 0);
      }
View Full Code Here

      if (serviceTypes == null) {
        return;
      }

      for (Class<?> st : serviceTypes) {
        UserMutableTreeNode node = addTypeNode(st);

        for (ServiceInfo si : services) {
          // try {
          // System.out.println(s.getServiceType());
          if (si.getType() == st) {
            UserMutableTreeNode node2 = serviceInfoToNode(si);
            node.add(node2);
            // store the node - service info relation
            serviceMapping.put(si.getLocalID(), node2);
          }
          // } catch (RemoteException e) {
View Full Code Here

        return;
      }

      for (ComputationTaskIDObject info : simulations) {
        DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) getRoot();
        UserMutableTreeNode node = simulationInfoToNode(info, server);
        insertNodeInto(node, rootNode, 0);
        simulationMapping.put(info, node);
      }
    }
View Full Code Here

     *          where the simulation is situated on
     * @return the default mutable tree node
     */
    public static UserMutableTreeNode simulationInfoToNode(
        ComputationTaskIDObject si, ISimulationServer server) {
      UserMutableTreeNode node =
          new UserMutableTreeNode(new NodeInfo<>(String.format(
              "<html><b>Simulation: </b> <i> %s</i></html>", si), si));

      try {

        node.add(new UserMutableTreeNode(new NodeInfo<>(
            String.format("<html><b>experiment ID: </b> <i> %s</i></html>",
                server.getSimulationRunProperty(si,
                    "CONFIGRUATION.EXPERIMENTNUMBER")), si)));

        node.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
            "<html><b>configuration ID: </b> <i> %s</i></html>",
            server.getSimulationRunProperty(si, "CONFIGRUATION.NUMBER")), si)));

        node.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
            "<html><b>Started at: </b> <i> %s</i></html>",
            new Date((Long) server.getSimulationRunProperty(si,
                "STARTTIME.WALLCLOCK"))), si)));

        node.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
            "<html><b>model class: </b> <i> %s</i></html>",
            server.getSimulationRunProperty(si, "MODEL.CLASS")), si)));

        node.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
            "<html><b>model name: </b> <i> %s</i></html>",
            server.getSimulationRunProperty(si, "MODEL.NAME")), si)));

        node.add(new UserMutableTreeNode(new NodeInfo<>(String.format(
            "<html><b>processor class: </b> <i> %s</i></html>",
            server.getSimulationRunProperty(si, "PROCESSOR.CLASS")), si)));

      } catch (RemoteException e) {
        SimSystem.report(e);
View Full Code Here

        removeNodeFromParent(simulationMapping.get(info));
        simulationMapping.remove(info);
      } else {
        // add
        // let's add the new service
        UserMutableTreeNode simNode = simulationInfoToNode(info, server);
        DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) getRoot();
        simulationMapping.put(info, simNode);
        insertNodeInto(simNode, rootNode, 0);
      }
View Full Code Here

TOP

Related Classes of org.jamesii.gui.server.view.util.UserMutableTreeNode

Copyright © 2018 www.massapicom. 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.