Package org.zkoss.zul

Examples of org.zkoss.zul.TreeitemRenderer


  }
 
  public static class TreeRendererFactory {
    public static TreeitemRenderer getBeanTreeitemRenderer() {
      return new TreeitemRenderer() {
        public void render(Treeitem item, Object data) throws Exception {
          SampleBean b = (SampleBean) ((DefaultTreeNode) data).getData();
          Treerow tr;
          if (item.getTreerow() == null) {
            tr = new Treerow();
View Full Code Here


          item.setOpen(true);
        }
      };
    }
    public static TreeitemRenderer getArrayTreeitemRenderer() {
      return new TreeitemRenderer() {
        public void render(Treeitem item, Object data) throws Exception {
          String[] ary = (String[]) ((DefaultTreeNode) data).getData();
          Treerow tr;
          if (item.getTreerow() == null) {
            tr = new Treerow();
View Full Code Here

          item.setOpen(true);
        }
      };
    }
    public static TreeitemRenderer getSingleColTreeitemRenderer() {
      return new TreeitemRenderer() {
        public void render(Treeitem item, Object data) throws Exception {
          Treerow tr;
          if (item.getTreerow() == null) {
            tr = new Treerow();
            tr.setParent(item);
View Full Code Here

  /**
   * Sets a renderer for the tree
   */
  private void initRenderer() {
    tree.setItemRenderer(new TreeitemRenderer() {

      public void render(Treeitem item, Object data) throws Exception {
        String label = "?";
        if (data instanceof DefaultTreeNode) {
          DefaultTreeNode node = (DefaultTreeNode) data;
View Full Code Here

        getContainerTree().setModel(modelForTree);
        getContainerTree().setTreeitemRenderer(getRendererForTree());
    }

    private TreeitemRenderer getRendererForTree() {
        return new TreeitemRenderer() {
            @Override
            public void render(Treeitem item, Object data)
                    {
                LimitingResourceQueue line = (LimitingResourceQueue) data;
                item.setOpen(false);
View Full Code Here

        getContainerTree().setModel(modelForTree);
        getContainerTree().setTreeitemRenderer(getRendererForTree());
    }

    private TreeitemRenderer getRendererForTree() {
        return new TreeitemRenderer() {
            @Override
            public void render(Treeitem item, Object data)
                    {
                LoadTimeLine line = (LoadTimeLine) data;
                item.setOpen(false);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.TreeitemRenderer

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.