com.vaadin.ui.Upload.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中com.vaadin.ui.Upload.<init>()方法的一些代码示例,展示了Upload.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Upload.<init>()方法的具体详情如下:
包路径:com.vaadin.ui.Upload
类名称:Upload
方法名:<init>

Upload.<init>介绍

[英]Creates a new instance of Upload. The receiver must be set before performing an upload.
[中]创建上载的新实例。在执行上传之前,必须设置接收器。

代码示例

代码示例来源:origin: org.activiti/activiti-explorer

protected Upload initChangePictureButton() {
 final Upload changePictureUpload = new Upload();
 changePictureUpload.setImmediate(true);
 changePictureUpload.setButtonCaption(i18nManager.getMessage(Messages.PROFILE_CHANGE_PICTURE));
 
 final InMemoryUploadReceiver receiver = initPictureReceiver(changePictureUpload);
 changePictureUpload.addListener(new FinishedListener() {
  private static final long serialVersionUID = 1L;
  public void uploadFinished(FinishedEvent event) {
   if (!receiver.isInterruped()) {
    picture = new Picture(receiver.getBytes(), receiver.getMimeType());
    identityService.setUserPicture(userId, picture);
    
    // reset picture
    imageLayout.removeAllComponents();
    initPicture();
   } else {
    receiver.reset();
   }
  }
 });
 
 return changePictureUpload;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void addUpload() {
 this.upload = new Upload(null, receiver);
 upload.setButtonCaption(i18nManager.getMessage(Messages.UPLOAD_SELECT));
 upload.setImmediate(true);
 addComponent(upload);
 setComponentAlignment(upload, Alignment.MIDDLE_CENTER);
 
 // register ourselves as listener for upload events
 upload.addListener((StartedListener) this);
 upload.addListener((FailedListener) this);
 upload.addListener((FinishedListener) this);
 upload.addListener((ProgressListener) this);
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void addUpload() {
 this.upload = new Upload(null, receiver);
 upload.setButtonCaption(i18nManager.getMessage(Messages.UPLOAD_SELECT));
 upload.setImmediate(true);
 addComponent(upload);
 setComponentAlignment(upload, Alignment.MIDDLE_CENTER);
 
 // register ourselves as listener for upload events
 upload.addListener((StartedListener) this);
 upload.addListener((FailedListener) this);
 upload.addListener((FinishedListener) this);
 upload.addListener((ProgressListener) this);
}

代码示例来源:origin: org.aperteworkflow/gui-commons

private void initComponent() {
  progressIndicator = new ProgressIndicator();
  progressIndicator.setPollingInterval(100);
  progressIndicator.setSizeFull();
  resetAndHideProgressIndicator();
  upload = new Upload(null, this);
  upload.setImmediate(true);
  upload.addListener((Upload.SucceededListener) this);
  upload.addListener((Upload.FailedListener) this);
  upload.addListener((Upload.ProgressListener) this);
  addComponent(upload);
  addComponent(progressIndicator);
}

代码示例来源:origin: org.aperteworkflow/cmis-widget

Upload upload = new Upload();
    upload.setButtonCaption(getI18NSource().getMessage("pt.ext.cmis.list.update.button"));
    upload.setReceiver(new UpdateReceiver(doc));
if ("normal".equalsIgnoreCase(mode) || !hasAnyDocuments) {
  vl.addComponent(new Label(getI18NSource().getMessage("pt.ext.cmis.list.upload")));
  Upload upload = new Upload();
  upload.setImmediate(true);
  upload.setButtonCaption(getI18NSource().getMessage("pt.ext.cmis.list.upload.button"));

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

void buildLayout() {
  final HorizontalLayout horizontalLayout = new HorizontalLayout();
  upload = new Upload();
  upload.setEnabled(false);
  upload.setButtonCaption(i18n.getMessage("caption.bulk.upload"));
  upload.setReceiver(this);
  upload.setImmediate(true);
  upload.setWidthUndefined();
  upload.addSucceededListener(this);
  upload.addFailedListener(this);
  upload.addStartedListener(this);
  horizontalLayout.addComponent(upload);
  horizontalLayout.setComponentAlignment(upload, Alignment.BOTTOM_RIGHT);
  setCompositionRoot(horizontalLayout);
}

代码示例来源:origin: eclipse/hawkbit

void buildLayout() {
  final HorizontalLayout horizontalLayout = new HorizontalLayout();
  upload = new Upload();
  upload.setEnabled(false);
  upload.setButtonCaption(i18n.getMessage("caption.bulk.upload"));
  upload.setReceiver(this);
  upload.setImmediate(true);
  upload.setWidthUndefined();
  upload.addSucceededListener(this);
  upload.addFailedListener(this);
  upload.addStartedListener(this);
  horizontalLayout.addComponent(upload);
  horizontalLayout.setComponentAlignment(upload, Alignment.BOTTOM_RIGHT);
  setCompositionRoot(horizontalLayout);
}

代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin

public void load(final long pid) {
  panel.removeAllComponents();
  final Upload upload = new Upload(null, receiver);
  upload.setImmediate(true);
  upload.setButtonCaption(m_messageSourceAccessor.getMessage("upload.file", "Upload File"));
  checkbox = new CheckBox(m_messageSourceAccessor.getMessage("upload.protected", "Protected"));
  comment = new TextField(m_messageSourceAccessor.getMessage("upload.comment", "Comment"));
  panel.addComponent(comment);
  panel.addComponent(checkbox);
  panel.addComponent(upload);
  upload.addFinishedListener(new Upload.FinishedListener() {
    private static final long serialVersionUID = 1L;
    public void uploadFinished(FinishedEvent event) {
      Attachment attachment = receiver.getWrapper().getCurrentAttachment();
      attachment.setProcessInstanceId(pid);
      attachment.setComment((String)comment.getValue());
      attachment.setProtectedDocument((boolean)checkbox.getValue());
      m_workflowDAO.addAttachment(attachment);
      close();
    }
  });
  
  if (getParent() == null) {
    UI.getCurrent().addWindow(this);
    this.center();
  }
}
public void close() {

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

final Table artifacts = new ArtifactTable(main);
final Table uploadedArtifacts = new ArtifactTable(main);
final Upload uploadArtifact = new Upload("Upload Artifact", new Upload.Receiver() {
  public OutputStream receiveUpload(String filename, String MIMEType) {
    FileOutputStream fos = null;

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

progressLayout.addComponent(uploadLabel);
final Upload upload = new Upload("", receiver);
upload.addSucceededListener(receiver);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

progressLayout.addComponent(uploadLabel);
final Upload upload = new Upload("", receiver);
upload.addSucceededListener(receiver);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

progressLayout.addComponent(uploadLabel);
final Upload upload = new Upload("", receiver);
upload.addSucceededListener(receiver);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

progressLayout.addComponent(uploadLabel);
final Upload upload = new Upload("", receiver);
upload.addSucceededListener(receiver);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

progressLayout.addComponent(uploadLabel);
final Upload upload = new Upload("", receiver);
upload.addSucceededListener(receiver);

代码示例来源:origin: apache/ace

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

相关文章