Package org.richfaces.model

Examples of org.richfaces.model.TreeNodeImpl


        return result;
    }

    private org.richfaces.model.TreeNode createClassicNode(TreeNode node) {
        TreeNodeImpl result = new DataHolderTreeNodeImpl(node.isLeaf(), ((SwingTreeNodeImpl<?>) node).getData());

        for (int i = 0; i < node.getChildCount(); i++) {
            result.addChild(i, createClassicNode(node.getChildAt(i)));
        }

        return result;
    }
View Full Code Here


        return result;
    }

    private org.richfaces.model.TreeNode createRootClassicNode(List<TreeNode> nodes) {
        TreeNodeImpl rootNode = new TreeNodeImpl();

        int key = 0;

        for (TreeNode node : nodes) {
            rootNode.addChild(key++, createClassicNode(node));
        }

        return rootNode;
    }
View Full Code Here

        checkPermission();
        createTree();
    }

    private void createTree() {
        this.root = new TreeNodeImpl();
        Map<ServerPluginType, List<PluginKey>> types = serverPluginsBean.getInstalledServerPluginsGroupedByType();

        for (ServerPluginType type : types.keySet()) {
            TreeNode typeNode = createTypeNode(type, types.get(type));
View Full Code Here

            }
        }
    }

    private TreeNode createTypeNode(ServerPluginType type, List<PluginKey> plugins) {
        TreeNode typeNode = new TreeNodeImpl();
        typeNode.setData(type);

        if (plugins != null && plugins.size() > 0) {
            for (PluginKey pluginKey : plugins) {
                TreeNode pluginNode = createPluginNode(pluginKey);
                pluginNode.setParent(typeNode);

                typeNode.addChild(pluginKey, pluginNode);
            }
        }

        return typeNode;
    }
View Full Code Here

    private TreeNode createPluginNode(PluginKey pluginKey) {
        ServerPlugin plugin = serverPluginsBean.getServerPlugin(pluginKey);
        plugin = serverPluginsBean.getServerPluginRelationships(plugin);

        TreeNode pluginNode = new TreeNodeImpl();
        pluginNode.setData(plugin);

        return pluginNode;
    }
View Full Code Here

    while (!end) {
      String key = path != null ? path + '.' + counter : String.valueOf(counter);

      String value = properties.getProperty(key);
      if (value != null) {
        TreeNodeImpl nodeImpl = new TreeNodeImpl();
        nodeImpl.setData(value);
        node.addChild(new Integer(counter), nodeImpl);
        addNodes(key, nodeImpl, properties);
        counter++;
      } else {
        end = true;
View Full Code Here

    InputStream dataStream = externalContext.getResourceAsStream(DATA_PATH);
    try {
      Properties properties = new Properties();
      properties.load(dataStream);
     
      rootNode = new TreeNodeImpl();
      addNodes(null, rootNode, properties);
     
    } catch (IOException e) {
      throw new FacesException(e.getMessage(), e);
    } finally {
View Full Code Here

    while (!end) {
      String key = path != null ? path + '.' + counter : String.valueOf(counter);

      String value = properties.getProperty(key);
      if (value != null) {
        TreeNodeImpl nodeImpl = new TreeNodeImpl();
        nodeImpl.setData(value);
        node.addChild(new Integer(counter), nodeImpl);
       
        addNodes(key, nodeImpl, properties);
       
        counter++;
View Full Code Here

    InputStream dataStream = externalContext.getResourceAsStream(DATA_PATH);
    try {
      Properties properties = new Properties();
      properties.load(dataStream);
     
      rootNode = new TreeNodeImpl();
      addNodes(null, rootNode, properties);
     
    } catch (IOException e) {
      throw new FacesException(e.getMessage(), e);
    } finally {
View Full Code Here

    super(arg0);
  }

  protected void setUp() throws Exception {
    super.setUp();
    node = new TreeNodeImpl();
  }
View Full Code Here

TOP

Related Classes of org.richfaces.model.TreeNodeImpl

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.