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

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


    final LayoutContainer container = new LayoutContainer();
    container.setLayoutOnChange(true);
    container.setBorders(true);
    container.setSize(200, 200);

    DropTarget target = new DropTarget(container) {
      @Override
      protected void onDragDrop(DNDEvent event) {
        super.onDragDrop(event);
        Html html = event.getData();
        container.add(html);
      }
    };
    target.setGroup("test");
    target.setOverStyle("drag-ok");

    final LayoutContainer sourceContainer = new LayoutContainer();
    sourceContainer.setLayoutOnChange(true);
    sourceContainer.setWidth(100);
View Full Code Here


        }
    }

    @Override public void onNodeTypesLoaded() {
        if (childCount == 0 && !missingList) {
            DropTarget target = new ModuleDropTarget(this, node == null ? EditModeDNDListener.EMPTYAREA_TYPE : EditModeDNDListener.PLACEHOLDER_TYPE);
            target.setOperation(DND.Operation.COPY);
            target.setFeedback(DND.Feedback.INSERT);
            target.addDNDListener(mainModule.getEditLinker().getDndListener());

            if (getNodeTypes() != null) {
                String[] nodeTypesArray = getNodeTypes().split(" ");
                for (final String s : nodeTypesArray) {
                    Button button = new Button(ModuleHelper.getNodeType(s) != null ? ModuleHelper.getNodeType(
View Full Code Here

        Log.debug("Add drag source for simple module " + path);

        if (hasDragDrop) {
            DragSource source = new SimpleModuleDragSource(this);
            source.addDNDListener(mainModule.getEditLinker().getDndListener());
            DropTarget target = new ModuleDropTarget(this, EditModeDNDListener.SIMPLEMODULE_TYPE);
            target.setAllowSelfAsSource(true);
            target.addDNDListener(mainModule.getEditLinker().getDndListener());
        } else {
            new DropTarget(this) {
                @Override
                protected void onDragEnter(DNDEvent event) {
                    event.getStatus().setStatus(false);
                }
            };
View Full Code Here

    @Override
    public void onParsed() {
    }

    public void onNodeTypesLoaded() {
        DropTarget target = new ModuleDropTarget(this, EditModeDNDListener.PLACEHOLDER_TYPE);
        target.setOperation(DND.Operation.COPY);
        target.setFeedback(DND.Feedback.INSERT);

        target.addDNDListener(mainModule.getEditLinker().getDndListener());

        if (getParentModule().getChildCount() >= getParentModule().getListLimit() && getParentModule().getListLimit() != -1) {
            return;
        }
View Full Code Here

TOP

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

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.