Package com.extjs.gxt.ui.client.dnd

Examples of com.extjs.gxt.ui.client.dnd.TreePanelDropTarget


    TreePanelDragSource source = new TreePanelDragSource(tree);
    source.addDNDListener(listener);
    TreePanelDragSource source2 = new TreePanelDragSource(tree2);
    source2.addDNDListener(listener);

    new TreePanelDropTarget(tree);
    new TreePanelDropTarget(tree2);

    add(hp);

  }
View Full Code Here


    center.add(view);

    new ListViewDragSource(view);

    TreePanelDropTarget target = new TreePanelDropTarget(tree) {
      @SuppressWarnings("rawtypes")
      @Override
      protected void handleAppendDrop(DNDEvent event, TreeNode item) {
        List<BeanModel> sel = event.getData();
        for (BeanModel bean : sel) {
          ModelData m = new BaseModelData();
          for (String s : bean.getPropertyNames()) {
            m.set(s, bean.get(s));
          }
          tree.getStore().add(item.getModel(), m, false);
        }
      }

    };
    target.setOperation(Operation.COPY);
    target.setFeedback(Feedback.APPEND);

    add(container);
  }
View Full Code Here

        }
        super.dragStart(e);
      }
    });

    TreePanelDropTarget target = new TreePanelDropTarget(tree);
    target.setAllowSelfAsSource(true);
    target.setFeedback(Feedback.BOTH);
    target.setScrollElementId(container.getId());

    container.add(tree);
    add(container);
  }
View Full Code Here

    cp.setSize(400, 200);
    cp.add(tree);
    cp.setLayout(new FitLayout());

    new TreePanelDragSource(tree);
    new TreePanelDropTarget(tree);

    add(cp);
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.dnd.TreePanelDropTarget

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.