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


Java Receiver类代码示例

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


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

示例1: UploadComponent

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
public UploadComponent(String description, Receiver receiver) {
  this.receiver = receiver;
  this.i18nManager = ExplorerApp.get().getI18nManager();
  this.notificationManager = ExplorerApp.get().getNotificationManager();
  
  init(description);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:8,代码来源:UploadComponent.java

示例2: UploadPopupWindow

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
public UploadPopupWindow(String caption, String description, Receiver receiver) {
  this.i18nManager = ExplorerApp.get().getI18nManager();
  
  init(caption, description, receiver);
  
  uploadComponent.addFinishedListener(new FinishedListener() {
    
    private static final long serialVersionUID = 1L;

    public void uploadFinished(FinishedEvent event) {
      close();
    }
  });
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:15,代码来源:UploadPopupWindow.java

示例3: init

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
protected void init(String caption, String description, Receiver receiver) {
  uploadComponent = new UploadComponent(description, receiver);
  uploadComponent.setSizeFull();
  initWindow(caption);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:6,代码来源:UploadPopupWindow.java

示例4: initFileUpload

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
protected void initFileUpload() {
  uploadComponent = new UploadComponent(null, new Receiver() {
    private static final long serialVersionUID = 1L;
    
    public OutputStream receiveUpload(String filename, String mType) {
      fileName = filename;
      
      // Try extracting the extention as well, and append it to the mime-type
      String extention = extractExtention(filename);
      if(extention != null) {
        mimeType = mType + MIME_TYPE_EXTENTION_SPLIT_CHAR + extention;
      } else {
        mimeType = mType;
      }
      
      // TODO: Refactor, don't use BAOS!!
      byteArrayOutputStream = new ByteArrayOutputStream();
      return byteArrayOutputStream;
    }
  });
  
  uploadComponent.addFinishedListener(new FinishedListener() {
    
    private static final long serialVersionUID = 1L;

    public void uploadFinished(FinishedEvent event) {
      // Update UI
      if(getAttachmentName() == null || "".equals(getAttachmentName())) {
        setAttachmentName(getFriendlyName(fileName));
      }
      
      fileUploaded = true;
      successIndicator.setVisible(true);
      successIndicator.setCaption(i18nManager.getMessage(Messages.RELATED_CONTENT_TYPE_FILE_UPLOADED, fileName));
      form.setComponentError(null);
    }
  });
  
  addComponent(uploadComponent);
  setExpandRatio(uploadComponent, 1.0f);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:42,代码来源:FileAttachmentEditorComponent.java

示例5: setReceiver

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
public void setReceiver(Receiver reciver) {
    this.receiver = reciver;
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:4,代码来源:Webcam.java

示例6: getReceiver

import com.vaadin.ui.Upload.Receiver; //导入依赖的package包/类
public Receiver getReceiver() {
    return receiver;
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:4,代码来源:Webcam.java


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