本文整理了Java中com.vaadin.ui.Upload.setReceiver()
方法的一些代码示例,展示了Upload.setReceiver()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Upload.setReceiver()
方法的具体详情如下:
包路径:com.vaadin.ui.Upload
类名称:Upload
方法名:setReceiver
[英]Sets the receiver.
[中]设置接收器。
代码示例来源:origin: org.activiti/activiti-explorer
public void setReceiver(Receiver receiver) {
this.receiver = receiver;
upload.setReceiver(receiver);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected InMemoryUploadReceiver initPictureReceiver(Upload upload) {
InMemoryUploadReceiver receiver = new InMemoryUploadReceiver(upload, 102400L); // 100 kb limit
upload.setReceiver(receiver);
receiver.setAcceptedMimeTypes(Constants.DEFAULT_IMAGE_MIMETYPES);
return receiver;
}
代码示例来源:origin: org.activiti/activiti-explorer
/**
* @param upload The component that will serve this receiver
* @param maxFileSize The maximum size of files that will be accepted (in bytes). -1 in case of no limit.
*/
public InMemoryUploadReceiver(Upload upload, long maxFileSize) {
this.upload = upload;
this.maxFileSize = maxFileSize;
this.notificationManager = ExplorerApp.get().getNotificationManager();
upload.setReceiver(this);
upload.addListener((StartedListener) this);
upload.addListener((ProgressListener) this);
}
代码示例来源:origin: apache/ace
/**
* Install this upload handler for the given {@link Upload} component.
*
* @param upload
* the upload component to install this handler on, cannot be <code>null</code>.
*/
public void install(Upload upload) {
upload.setReceiver(this);
upload.addListener((Upload.FailedListener) this);
upload.addListener((Upload.FinishedListener) this);
upload.addListener((Upload.ProgressListener) this);
upload.addListener((Upload.SucceededListener) this);
}
代码示例来源: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: org.aperteworkflow/cmis-widget
Upload upload = new Upload();
upload.setButtonCaption(getI18NSource().getMessage("pt.ext.cmis.list.update.button"));
upload.setReceiver(new UpdateReceiver(doc));
upload.setImmediate(true);
upload.setImmediate(true);
upload.setButtonCaption(getI18NSource().getMessage("pt.ext.cmis.list.upload.button"));
upload.setReceiver(new Upload.Receiver() {
@Override
public OutputStream receiveUpload(final String filename, final String MIMEType) {
内容来源于网络,如有侵权,请联系作者删除!