Package com.extjs.gxt.ui.client.widget.treegrid.TreeGrid

Examples of com.extjs.gxt.ui.client.widget.treegrid.TreeGrid.TreeNode


    onIconStyleChange(node, IconHelper.createStyle("x-tree3-loading"));
  }

  @Override
  protected void cleanModel(ModelData at) {
    TreeNode node = findNode(at);
    if (node != null) {
      node.clearElements();
    }
  }
View Full Code Here


  }

  @Override
  protected void onRemove(ListStore<ModelData> ds, ModelData m, int index, boolean isUpdate) {
    super.onRemove(ds, m, index, isUpdate);
    TreeNode node = findNode(m);
    if (node != null) {
      node.clearElements();
    }
  }
View Full Code Here

    event.setCancelled(false);
  }

  @Override
  protected void showFeedback(DNDEvent event) {
    final TreeNode item = treeGrid.findNode(event.getTarget());
    if (item == null) {
      if (activeItem != null) {
        clearStyle(activeItem);
      }
    }

    if (event.getDropTarget().component == event.getDragSource().component) {
      TreeGrid source = (TreeGrid) event.getDragSource().component;
      ModelData sel = source.getSelectionModel().getSelectedItem();
      ModelData overModel = item.getModel();
      if (overModel == sel) {
        Insert.get().hide();
        event.getStatus().setStatus(false);
        return;
      }
      List<ModelData> children = treeGrid.getTreeStore().getChildren(sel, true);
      if (children.contains(item.getModel())) {
        Insert.get().hide();
        event.getStatus().setStatus(false);
        return;
      }
    }

    boolean append = feedback == Feedback.APPEND || feedback == Feedback.BOTH;
    boolean insert = feedback == Feedback.INSERT || feedback == Feedback.BOTH;

    if (item == null) {
      handleAppend(event, item);
    } else if (insert) {
      handleInsert(event, item);
    } else if ((!item.isLeaf() || allowDropOnLeaf) && append) {
      handleAppend(event, item);
    } else {
      if (activeItem != null) {
        clearStyle(activeItem);
      }
View Full Code Here

    int idx = ds.indexOf(p);

    ds.insert(children, idx + 1);

    for (ModelData child : children) {
      TreeNode cn = tree.findNode(child);
      if (cn.isExpanded()) {
        expand(cn);
      }
    }
    tree.refresh(node.m);
  }
View Full Code Here

    return sb.toString();
  }
 
  public boolean isSelectableTarget(ModelData model, Element target) {
    TreeNode node = tree.findNode(model);
    if (node != null) {
      if (DOM.isOrHasChild(getJointElement(node), target)) {
        return false;
      }
    }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.treegrid.TreeGrid.TreeNode

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.