Package com.extjs.gxt.ui.client.data

Examples of com.extjs.gxt.ui.client.data.BaseTreeModel


    ArrayList list = new ArrayList();
    Iterator itList = result.iterator();
    while (itList.hasNext()) {
      Map actual = (Map) itList.next();
      ColumnModel model = ((TreeGridProxy)this.getProxy()).getCallback().getGrid().getColumnModel();
      BaseTreeModel baseModel;
      if (Boolean.TRUE.equals(actual.get(ParamsConst.IS_DIRECTORY))) {
        Context.getInstance().addDetailExecution("Instanciando Folder");
        baseModel = new Folder();
      } else {
        Context.getInstance().addDetailExecution("Instanciando Music");
        baseModel = new Music();
      }
      List columns = model.getColumns();
      Iterator it = columns.iterator();
      while (it.hasNext()) {
        ColumnConfig columnConfig = (ColumnConfig) it.next();
        baseModel.set(columnConfig.getId(), actual.get(columnConfig.getId()));
      }
      list.add(baseModel);
    }   
   
      TreeLoadEvent evt = new TreeLoadEvent(this, loadConfig, list);
View Full Code Here


      } else {
        modelFastMap = new FastMap<TreeModel>();
        useKeyProvider = true;
      }
    }
    TreeModel wrapper = new BaseTreeModel();
    wrapper.set("id", String.valueOf(counter++));
    if (useKeyProvider) {
      modelFastMap.put(getKey(model), wrapper);
    } else {
      modelMap.put(model, wrapper);
    }
    wrapperMap.put(wrapper.<String> get("id"), model);
    return wrapper;
  }
View Full Code Here

      public void handleEvent(TreePanelEvent<ModelData> be) {
        be.getTreePanel().setExpanded(root, true);
      }
    });

    BaseTreeModel root2 = new BaseTreeModel();
    root2.set("name", "My Files");

    store = new TreeStore<ModelData>();
    store.setStoreSorter(sorter);
    store.add(root2, false);
View Full Code Here

  private final boolean isValid(List selection) {
    if (selection == null)
      return false;
    for (Object nd : selection) {
      BaseTreeModel btm = ((BaseTreeModel) nd);
      Object model = btm.getProperties().get("model");
      if (model != null && model instanceof TreeNode) {
        TreeNode node = (TreeNode) model;
        XObject wrappedXObj = browserModel.getWrappedXObject(node);
        // if(wrappedXObj instanceof XStaticFolder)
        // return false;
View Full Code Here

  private final XObject[] getMoveableElementsFrom(List nodes,
      TreeNode newParent) {
    List<XObject> elements = new ArrayList<XObject>();
    for (Object nd : nodes) {
      BaseTreeModel btm = ((BaseTreeModel) nd);
      Object model = btm.getProperties().get("model");
      if (model != null && model instanceof TreeNode) {
        TreeNode node = (TreeNode) model;
        XObject wrappedXObj = browserModel.getWrappedXObject(node);
        if (wrappedXObj instanceof XFolderElement
            || wrappedXObj instanceof XStaticFolder) {
View Full Code Here

      } else {
        modelFastMap = new FastMap<TreeModel>();
        useKeyProvider = true;
      }
    }
    TreeModel wrapper = new BaseTreeModel();
    wrapper.set("id", String.valueOf(counter++));
    if (useKeyProvider) {
      modelFastMap.put(getKey(model), wrapper);
    } else {
      modelMap.put(model, wrapper);
    }
    wrapperMap.put(wrapper.<String> get("id"), model);
    return wrapper;
  }
View Full Code Here

      } else {
        modelFastMap = new FastMap<TreeModel>();
        useKeyProvider = true;
      }
    }
    TreeModel wrapper = new BaseTreeModel();
    wrapper.set("id", String.valueOf(counter++));
    if (useKeyProvider) {
      modelFastMap.put(getKey(model), wrapper);
    } else {
      modelMap.put(model, wrapper);
    }
    wrapperMap.put(wrapper.<String> get("id"), model);
    return wrapper;
  }
View Full Code Here

  protected List<M> unwrapChildren(TreeModel parent) {
    return unwrap(parent.getChildren());
  }

  protected TreeModel wrap(M model) {
    TreeModel wrapper = new BaseTreeModel();
    modelMap.put(model, wrapper);
    wrapperMap.put(wrapper, model);
    return wrapper;
  }
View Full Code Here

      } else {
        modelFastMap = new FastMap<TreeModel>();
        useKeyProvider = true;
      }
    }
    TreeModel wrapper = new BaseTreeModel();
    wrapper.set("id", String.valueOf(counter++));
    if (useKeyProvider) {
      modelFastMap.put(getKey(model), wrapper);
    } else {
      modelMap.put(model, wrapper);
    }
    wrapperMap.put(wrapper.<String> get("id"), model);
    return wrapper;
  }
View Full Code Here

      } else {
        modelFastMap = new FastMap<TreeModel>();
        useKeyProvider = true;
      }
    }
    TreeModel wrapper = new BaseTreeModel();
    wrapper.set("id", String.valueOf(counter++));
    if (useKeyProvider) {
      modelFastMap.put(getKey(model), wrapper);
    } else {
      modelMap.put(model, wrapper);
    }
    wrapperMap.put(wrapper.<String> get("id"), model);
    return wrapper;
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.data.BaseTreeModel

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.