当前位置: 首页>>代码示例>>Java>>正文


Java SucceededListener类代码示例

本文整理汇总了Java中com.vaadin.ui.Upload.SucceededListener的典型用法代码示例。如果您正苦于以下问题:Java SucceededListener类的具体用法?Java SucceededListener怎么用?Java SucceededListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SucceededListener类属于com.vaadin.ui.Upload包,在下文中一共展示了SucceededListener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getUploadSucceededListener

import com.vaadin.ui.Upload.SucceededListener; //导入依赖的package包/类
@SuppressWarnings("serial")
private SucceededListener getUploadSucceededListener() {
    return new SucceededListener() {

        @Override
        public void uploadSucceeded(SucceededEvent event) {
            log.info("Upload Successful! Analyzing Uploaded Image.....");
            final ProgressIndicatorWindow progressIndicatorWindow = new ProgressIndicatorWindow();

            progressIndicatorWindow.setWidth("200px");
            progressIndicatorWindow.setHeight("100px");
            progressIndicatorWindow.setCaption("Processing image ...");

            UI.getCurrent().addWindow(progressIndicatorWindow);
            progressIndicatorWindow.bringToFront();

            Runnable serviceCall = uploadValidationService(progressIndicatorWindow, event);

            ScheduledExecutorService exec = Executors.newScheduledThreadPool(1);
            exec.schedule(serviceCall, 1, TimeUnit.MILLISECONDS);
        }
    };
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:24,代码来源:ImportApplianceSoftwareVersionWindow.java

示例2: UploadComponent

import com.vaadin.ui.Upload.SucceededListener; //导入依赖的package包/类
public UploadComponent(String buttonCaption, String sessionId, int maxSize, String folderPath) {
     upload = new Upload();
     this.addComponent(upload);
     this.maxSize = maxSize;
     upload.setReceiver( this); 
     this.directory = folderPath;
     upload.setButtonCaption(buttonCaption);
     upload.addSucceededListener((Upload.SucceededListener) this);
     upload.addFailedListener((Upload.FailedListener) this);
     upload.addProgressListener((Upload.ProgressListener) this);
     upload.addFinishedListener((Upload.FinishedListener) this);
     
     processingLayout = new HorizontalLayout();
     processingLayout.setSpacing(true);
     processingLayout.setVisible(false);
     this.addComponent(processingLayout);

     progressBar = new ProgressBar();
     processingLayout.addComponent(progressBar);
     
     cancelProcessing = new Button("cancel", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
	cancelled = true;
             upload.interruptUpload();
	
}
     });
     processingLayout.addComponent(cancelProcessing);
 }
 
开发者ID:nyholmniklas,项目名称:vaadinInvoiceGenerator,代码行数:31,代码来源:UploadComponent.java

示例3: withSucceededListener

import com.vaadin.ui.Upload.SucceededListener; //导入依赖的package包/类
/**
 * Adds the upload success event listener.
 *
 * @param listener
 *            the Listener to be added, not null
 * @return this for method chaining
 * @see Upload#addSucceededListener(SucceededListener)
 */
@SuppressWarnings("unchecked")
public default THIS withSucceededListener(SucceededListener listener) {
    ((Upload) this).addSucceededListener(listener);
    return (THIS) this;
}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:14,代码来源:FluentUpload.java


注:本文中的com.vaadin.ui.Upload.SucceededListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。