本文整理了Java中com.vaadin.ui.Upload.setImmediate()
方法的一些代码示例,展示了Upload.setImmediate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Upload.setImmediate()
方法的具体详情如下:
包路径:com.vaadin.ui.Upload
类名称:Upload
方法名:setImmediate
[英]Sets the immediate mode of the upload.
If the upload is in immediate mode, the file upload is started immediately after the user has selected the file.
If the upload is not in immediate mode, after selecting the file the user must click another button to start the upload.
The default mode of an Upload component is immediate.
[中]设置上传的即时模式。
如果上载处于即时模式,则在用户选择文件后立即开始文件上载。
如果上载未处于即时模式,则在选择文件后,用户必须单击另一个按钮以开始上载。
上载组件的默认模式为立即。
代码示例来源:origin: org.aperteworkflow/gui-commons
public void setUploadImmediate(boolean immediate) {
upload.setImmediate(immediate);
}
代码示例来源: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.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.setButtonCaption(getI18NSource().getMessage("pt.ext.cmis.list.update.button"));
upload.setReceiver(new UpdateReceiver(doc));
upload.setImmediate(true);
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"));
upload.setReceiver(new Upload.Receiver() {
代码示例来源:origin: org.aperteworkflow/base-widgets
private void initView() {
uploadFile.setImmediate(true);
代码示例来源: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
uploadArtifact.setImmediate(true);
内容来源于网络,如有侵权,请联系作者删除!