Package com.vaadin.event

Examples of com.vaadin.event.Transferable


    public AcceptCriterion getAcceptCriterion() {
        return AcceptAll.get();
    }

    public void drop(DragAndDropEvent dropEvent) {
        Transferable t = dropEvent.getTransferable();
        Component src = t.getSourceComponent();
        Object sourceItemId;
        HierarchicalContainer container = (HierarchicalContainer) tree.getContainerDataSource();
        if (src instanceof WidgetInfoDnDWrapper) { //add widget
            WidgetInfoDnDWrapper dragAndDropWrapper = (WidgetInfoDnDWrapper) src;
            WidgetItem wi = dragAndDropWrapper.widgetItem;
View Full Code Here


        DragAndDropWrapper wr = new DragAndDropWrapper(pane);
        wr.setDropHandler(new DropHandler() {
            @Override
            public void drop(DragAndDropEvent event) {
                Transferable t = event.getTransferable();
                Component src = t.getSourceComponent();
                if (src != stepTree || !(t instanceof DataBoundTransferable)) {
                    return;
                }
                Object sourceItemId = ((DataBoundTransferable) t).getItemId();
View Full Code Here

        /*
         * Construct the Transferable and the DragDropDetails for the drop
         * operation based on the info passed from the client widgets (drag
         * source for Transferable, drop target for DragDropDetails).
         */
        Transferable transferable = constructTransferable(dropTarget, variables);
        TargetDetails dropData = constructDragDropDetails(dropTarget, variables);
        DragAndDropEvent dropEvent = new DragAndDropEvent(transferable,
                dropData);
        if (dropHandler.getAcceptCriterion().accept(dropEvent)) {
            dropHandler.drop(dropEvent);
View Full Code Here

        /*
         * Construct the Transferable and the DragDropDetails for the drag
         * operation based on the info passed from the client widgets (drag
         * source for Transferable, current target for DragDropDetails).
         */
        Transferable transferable = constructTransferable(dropTarget, variables);
        TargetDetails dragDropDetails = constructDragDropDetails(dropTarget,
                variables);

        dragEvent = new DragAndDropEvent(transferable, dragDropDetails);

View Full Code Here

        final Component sourceComponent = (Component) variables
                .get("component");

        variables = (Map<String, Object>) variables.get("tra");

        Transferable transferable = null;
        if (sourceComponent != null && sourceComponent instanceof DragSource) {
            transferable = ((DragSource) sourceComponent)
                    .getTransferable(variables);
        }
        if (transferable == null) {
View Full Code Here

        /*
         * Construct the Transferable and the DragDropDetails for the drop
         * operation based on the info passed from the client widgets (drag
         * source for Transferable, drop target for DragDropDetails).
         */
        Transferable transferable = constructTransferable(dropTarget, variables);
        TargetDetails dropData = constructDragDropDetails(dropTarget, variables);
        DragAndDropEvent dropEvent = new DragAndDropEvent(transferable,
                dropData);
        if (dropHandler.getAcceptCriterion().accept(dropEvent)) {
            dropHandler.drop(dropEvent);
View Full Code Here

        /*
         * Construct the Transferable and the DragDropDetails for the drag
         * operation based on the info passed from the client widgets (drag
         * source for Transferable, current target for DragDropDetails).
         */
        Transferable transferable = constructTransferable(dropTarget, variables);
        TargetDetails dragDropDetails = constructDragDropDetails(dropTarget,
                variables);

        dragEvent = new DragAndDropEvent(transferable, dragDropDetails);

View Full Code Here

        final Component sourceComponent = (Component) variables
                .get("component");

        variables = (Map<String, Object>) variables.get("tra");

        Transferable transferable = null;
        if (sourceComponent != null && sourceComponent instanceof DragSource) {
            transferable = ((DragSource) sourceComponent)
                    .getTransferable(variables);
        }
        if (transferable == null) {
View Full Code Here

                        return AcceptAll.get();
                    }

                    @Override
                    public void drop(DragAndDropEvent event) {
                        Transferable transferable = event.getTransferable();
                        Component sourceComponent = transferable
                                .getSourceComponent();

                        if (sourceComponent != layout.getParent()) {
                            AbstractComponent c = createComponentFromPaletteItem(
                                    sourceComponent.getCaption(), null);
View Full Code Here

            // return new SourceIs(component)
            return AcceptAll.get();
        }

        public void drop(DragAndDropEvent dropEvent) {
            Transferable transferable = dropEvent.getTransferable();
            Component sourceComponent = transferable.getSourceComponent();

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

            if (sourceComponent.getParent() != layout) {
View Full Code Here

TOP

Related Classes of com.vaadin.event.Transferable

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.