Examples of DropTarget


Examples of ae.java.awt.dnd.DropTarget

    public synchronized void setDropTarget(DropTarget dt) {
        if (dt == dropTarget || (dropTarget != null && dropTarget.equals(dt)))
            return;

        DropTarget old;

        if ((old = dropTarget) != null) {
            if (peer != null) dropTarget.removeNotify(peer);

            DropTarget t = dropTarget;

            dropTarget = null;

            try {
                t.setComponent(null);
            } catch (IllegalArgumentException iae) {
                // ignore it.
            }
        }
View Full Code Here

Examples of com.day.cq.wcm.api.components.DropTarget

            Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

            if (dropTargets != null && !dropTargets.isEmpty()) {
                // Auto generate images with drop-targets
                for (final Map.Entry<String, DropTarget> entry : dropTargets.entrySet()) {
                    final DropTarget dropTarget = entry.getValue();

                    html.append("<img src=\"/libs/cq/ui/resources/0.gif\" ");
                    html.append("class=\"").append(dropTarget.getId());
                    html.append(" ").append(getWCMEditType(dropTarget).getCssClass()).append("\" ");
                    html.append("alt=\"Drop Target: ").append(dropTarget.getName()).append("\" ");
                    html.append("title=\"Drop Target: ").append(dropTarget.getName()).append("\"/>");
                }
            }
        } else {
            final String title = StringUtils.capitalize(component.getTitle());
View Full Code Here

Examples of com.day.cq.wcm.api.components.DropTarget

        ComponentEditConfig editConfig = component.getEditConfig();
        Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

        if (dropTargets != null && !dropTargets.isEmpty()) {
            DropTarget dropTarget = null;

            // Find the named Drop Target
            for (final Map.Entry<String, DropTarget> entry : dropTargets.entrySet()) {
                dropTarget = entry.getValue();
                if (StringUtils.equals(name, dropTarget.getName())) {
                    break;
                } else {
                    dropTarget = null;
                }
            }

            if (dropTarget != null) {
                // If editType has not been specified then intelligently determine the best match
                editType = (editType == null) ? getWCMEditType(dropTarget) : editType;

                String classNames = dropTarget.getId() + " " + editType.getCssClass();
                String placeholderTitle = "Drop Target: " + dropTarget.getName();

                html.append(generateClassicUIPlaceholder(classNames, placeholderTitle));
            }
        }
View Full Code Here

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

Examples of com.vaadin.event.dd.DropTarget

            final Transferable transferable = dropEvent.getTransferable();
            final Component sourceComponent = transferable.getSourceComponent();
            if (sourceComponent instanceof WrappedComponent) {
                final TargetDetails dropTargetData = dropEvent
                        .getTargetDetails();
                final DropTarget target = dropTargetData.getTarget();

                // find the location where to move the dragged component
                boolean sourceWasAfterTarget = true;
                int index = 0;
                final Iterator<Component> componentIterator = layout
View Full Code Here

Examples of com.vaadin.event.dd.DropTarget

                            .getSourceComponent();

                    Component draggedComponent = transferable
                            .getDraggedComponent();

                    DropTarget target = dropEvent.getTargetDetails()
                            .getTarget();

                    WrappedLabel wrappedLabel = new WrappedLabel(
                            draggedComponent.toString());
                    if (target instanceof WrappedLabel) {
View Full Code Here

Examples of com.vaadin.event.dd.DropTarget

                    + " must implement DropTarget");
            return;
        }
        // owner cannot be null here

        DropTarget dropTarget = (DropTarget) owner;
        lastVisitId = (Integer) variables.get("visitId");

        // request may be dropRequest or request during drag operation (commonly
        // dragover or dragenter)
        boolean dropRequest = isDropRequest(variables);
View Full Code Here

Examples of java.awt.dnd.DropTarget

    new OverlayListener(this);
    (new DragSource()).createDefaultDragGestureRecognizer(this,
        DnDConstants.ACTION_MOVE, this);

    new DropTarget(this, this);
  }
View Full Code Here

Examples of java.awt.dnd.DropTarget

    mButtonPanel.updateUI();
  }

  private void init() {
    // set the drop targets of the Actions
    new DropTarget(MainFrame.getInstance().getToolbar(), this);
    new DropTarget(MainFrame.getInstance().getToolBarPanel(), this);
    new DropTarget(mButtonPanel, this);

    // set up the ActionButtons in the ToolBar for dragging
    MainFrame.getInstance().getToolbar().disableForDragAndDrop(this, mWest);

    if (mShowToolbarCb.isSelected()) {
View Full Code Here

Examples of java.awt.dnd.DropTarget

    mTimer.start();

    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

    //create the drop target for installation of Plugins with Drag'N'Drop on MainFrame
    DropTarget target = new DropTarget();
    try {
      target.addDropTargetListener(this);
    } catch (TooManyListenersException e1) {
      //ignore
    }

    this.setDropTarget(target);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.