List of usage examples for com.vaadin.ui Upload addStyleName
@Override public void addStyleName(String style)
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadLayout.java
License:Open Source License
private void buildLayout() { final Upload upload = new Upload(); final UploadHandler uploadHandler = new UploadHandler(null, 0, this, multipartConfigElement.getMaxFileSize(), upload, null, null, softwareModuleManagement); upload.setButtonCaption(i18n.getMessage("upload.file")); upload.setImmediate(true);/* w w w . j a va 2 s .c o m*/ upload.setReceiver(uploadHandler); upload.addSucceededListener(uploadHandler); upload.addFailedListener(uploadHandler); upload.addFinishedListener(uploadHandler); upload.addProgressListener(uploadHandler); upload.addStartedListener(uploadHandler); upload.addStyleName(SPUIStyleDefinitions.ACTION_BUTTON); upload.addStyleName("no-border"); fileUploadLayout = new HorizontalLayout(); fileUploadLayout.setSpacing(true); fileUploadLayout.addStyleName(SPUIStyleDefinitions.FOOTER_LAYOUT); fileUploadLayout.addComponent(upload); fileUploadLayout.setComponentAlignment(upload, Alignment.MIDDLE_LEFT); fileUploadLayout.addComponent(processBtn); fileUploadLayout.setComponentAlignment(processBtn, Alignment.MIDDLE_RIGHT); fileUploadLayout.addComponent(discardBtn); fileUploadLayout.setComponentAlignment(discardBtn, Alignment.MIDDLE_RIGHT); fileUploadLayout.addComponent(uploadStatusButton); fileUploadLayout.setComponentAlignment(uploadStatusButton, Alignment.MIDDLE_RIGHT); setMargin(false); /* create drag-drop wrapper for drop area */ dropAreaWrapper = new DragAndDropWrapper(createDropAreaLayout()); dropAreaWrapper.setDropHandler(new DropAreahandler()); setSizeFull(); setSpacing(true); }