Package com.vaadin.ui

Examples of com.vaadin.ui.DragAndDropWrapper$WrapperTargetDetails


        final Upload uploadArtifact = new Upload("Upload Artifact", uploadHandler);
        uploadArtifact.addListener((SucceededListener) uploadHandler);
        uploadArtifact.addListener((FailedListener) uploadHandler);
        uploadArtifact.setImmediate(true);

        final DragAndDropWrapper finalUploadedArtifacts = new DragAndDropWrapper(uploadedArtifacts);
        finalUploadedArtifacts.setDropHandler(new ArtifactDropHandler(uploadHandler));

        addListener(new Window.CloseListener() {
            public void windowClose(CloseEvent e) {
                for (File artifact : m_uploadedArtifacts) {
                    artifact.delete();
View Full Code Here


        m_grid.addComponent(m_mainToolbar, 0, 0, count - 1, 0);

        m_artifactsPanel = createArtifactsPanel();
        m_artifactToolbar = createArtifactToolbar();

        final DragAndDropWrapper artifactsPanelWrapper = new DragAndDropWrapper(m_artifactsPanel);
        artifactsPanelWrapper.setDragStartMode(DragStartMode.HTML5);
        artifactsPanelWrapper.setDropHandler(new ArtifactDropHandler(uploadHandler));
        artifactsPanelWrapper.setCaption(m_artifactsPanel.getCaption());
        artifactsPanelWrapper.setSizeFull();

        count = 0;
        if (auth.hasRole("viewArtifact")) {
            m_grid.addComponent(artifactsPanelWrapper, count, 2);
            m_grid.addComponent(m_artifactToolbar, count, 1);
View Full Code Here

        final Upload uploadArtifact = new Upload();
        uploadArtifact.setCaption("Upload Artifact");
        uploadHandler.install(uploadArtifact);

        final DragAndDropWrapper finalUploadedArtifacts = new DragAndDropWrapper(uploadedArtifacts);
        finalUploadedArtifacts.setDropHandler(new ArtifactDropHandler(uploadHandler));

        addListener(new Window.CloseListener() {
            public void windowClose(CloseEvent e) {
                for (File artifact : m_uploadedArtifacts) {
                    artifact.delete();
View Full Code Here

                    };

                    if (name.startsWith("XHRFILE")) {
                        String[] split = item.getFieldName().substring(7)
                                .split("\\.");
                        DragAndDropWrapper ddw = (DragAndDropWrapper) idPaintableMap
                                .get(split[0]);

                        try {
                            ddw.receiveFile(upstream, split[1]);
                        } catch (UploadException e) {
                            synchronized (application) {
                                handleChangeVariablesError(application, ddw, e,
                                        new HashMap<String, Object>());
                            }
View Full Code Here

    setComponentAlignment(orLabel, Alignment.MIDDLE_CENTER);
  }

  protected void addDropPanel() {
    Panel dropPanel = new Panel();
    DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(dropPanel);
    dragAndDropWrapper.setDropHandler(this);
    dragAndDropWrapper.setWidth("80%");
    addComponent(dragAndDropWrapper);
    setComponentAlignment(dragAndDropWrapper, Alignment.MIDDLE_CENTER);
   
    Label dropLabel = new Label(i18nManager.getMessage(Messages.UPLOAD_DROP));
    dropLabel.setSizeUndefined();
View Full Code Here

    setComponentAlignment(orLabel, Alignment.MIDDLE_CENTER);
  }

  protected void addDropPanel() {
    Panel dropPanel = new Panel();
    DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(dropPanel);
    dragAndDropWrapper.setDropHandler(this);
    dragAndDropWrapper.setWidth("80%");
    addComponent(dragAndDropWrapper);
    setComponentAlignment(dragAndDropWrapper, Alignment.MIDDLE_CENTER);
   
    Label dropLabel = new Label(i18nManager.getMessage(Messages.UPLOAD_DROP));
    dropLabel.setSizeUndefined();
View Full Code Here

                }
            });

            if (view.equals("reports")) {
                // Add drop target to reports button
                DragAndDropWrapper reports = new DragAndDropWrapper(b);
                reports.setDragStartMode(DragStartMode.NONE);
                reports.setDropHandler(new DropHandler() {

                    /**
           *
           */
          private static final long serialVersionUID = 807233394697701837L;
View Full Code Here

        Image l = new Image(null, new ThemeResource("img/palette-text.png"));
        wrap.addComponent(l);
        Label caption = new Label("Text Block");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper rte = new DragAndDropWrapper(wrap);
        rte.setSizeUndefined();
        rte.setCaption("text");
        paletteLayout.addComponent(rte);
        rte.setDragStartMode(DragStartMode.WRAPPER);

        wrap = new CssLayout();
        l = new Image(null, new ThemeResource("img/palette-grid.png"));
        wrap.addComponent(l);
        caption = new Label("Top 10 Movies");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper grid = new DragAndDropWrapper(wrap);
        grid.setCaption("grid");
        grid.setSizeUndefined();
        paletteLayout.addComponent(grid);
        grid.setDragStartMode(DragStartMode.WRAPPER);

        wrap = new CssLayout();
        l = new Image(null, new ThemeResource("img/palette-chart.png"));
        wrap.addComponent(l);
        caption = new Label("Top 4 Revenue");
        caption.setSizeUndefined();
        wrap.addComponent(caption);
        DragAndDropWrapper chart = new DragAndDropWrapper(wrap);
        chart.setCaption("chart");
        chart.setSizeUndefined();
        paletteLayout.addComponent(chart);
        chart.setDragStartMode(DragStartMode.WRAPPER);

        return editor;
    }
View Full Code Here

                addComponent(createComponentFromPaletteItem("text", ""));
                addComponent(labels);
            } else {

                final DragAndDropWrapper placeholder = new DragAndDropWrapper(l);
                placeholder.addStyleName("placeholder");
                placeholder.setDropHandler(new DropHandler() {

                    @Override
                    public AcceptCriterion getAcceptCriterion() {
                        // return new SourceIsTarget.get());
                        return AcceptAll.get();
View Full Code Here

TOP

Related Classes of com.vaadin.ui.DragAndDropWrapper$WrapperTargetDetails

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.