Package org.zkoss.zul

Examples of org.zkoss.zul.DefaultTreeModel


    public static DefaultTreeModel getSingleColDefaultTreeModel(int level1, int level2, int level3, String label) {
      List list = getList(10, label);
      List list2 = new ArrayList();
      for (int i =0 ,j = list.size(); i < j; i++)
        list2.add(new DefaultTreeNode(list.get(i)));
      return new DefaultTreeModel(new DefaultTreeNode(null, list2));
    }
View Full Code Here


       
        list.add(new DefaultTreeNode(new SampleBean(label + " " + rand.nextInt(level1),
            rand.nextInt(level1), cal.getTime()), subList));
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
      return new DefaultTreeModel(new DefaultTreeNode(null, list));
    }
View Full Code Here

       
        list.add(new DefaultTreeNode(new String[]{label + " " + rand.nextInt(level1),
            rand.nextInt(level1)+"", df.format(cal.getTime())}, subList));
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
      return new DefaultTreeModel(new DefaultTreeNode(null, list));
    }
View Full Code Here

    rootFolderMap.put(url, map);
   
    parseFolders(url, map);
   
    tree.setItemRenderer(new ExplorerTreeitemRenderer());
    tree.setModel(new DefaultTreeModel(new DefaultTreeNode("ROOT",initTreeModel(rootFolderMap, new ArrayList()))));
   
    showImages(map);
  }
View Full Code Here

    persons.add(barack);

    List<DefaultTreeNode> nodes = toNode(persons);

    DefaultTreeNode rootNode = new DefaultTreeNode(null, nodes);
    DefaultTreeModel model = new DefaultTreeModel(rootNode);

    tree.setModel(model);
  }
View Full Code Here

     
      /**
       * TODO: use i-18n instead hardcode
       */
      DefaultTreeNode root = new DefaultTreeNode("Cell Reference", nodes);
      DefaultTreeModel model = new DefaultTreeModel(root);
      tree.setModel(model);
     
      tree.addEventListener(Events.ON_SELECT, new EventListener() {
       
        @Override
View Full Code Here

TOP

Related Classes of org.zkoss.zul.DefaultTreeModel

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.