List of usage examples for com.vaadin.ui ProgressBar ProgressBar
public ProgressBar()
From source file:annis.gui.resultview.VisualizerPanel.java
License:Apache License
/** * This Constructor should be used for {@link ComponentVisualizerPlugin} * Visualizer.//from w w w . j av a2s .co m * */ public VisualizerPanel(final ResolverEntry entry, SDocument result, String corpusName, String documentName, Set<String> visibleTokenAnnos, Map<String, Long> markedAndCovered, @Deprecated Map<String, String> markedAndCoveredMap, @Deprecated Map<String, String> markedExactMap, String htmlID, String resultID, SingleResultPanel parent, String segmentationName, PluginSystem ps, InstanceConfig instanceConfig) throws IOException { this.ps = ps; this.instanceConfig = instanceConfig; this.entry = entry; this.markersExact = markedExactMap; this.markersCovered = markedAndCoveredMap; this.visCtxChanger = parent; this.result = result; this.corpusName = corpusName; this.documentName = documentName; this.visibleTokenAnnos = visibleTokenAnnos; this.markedAndCovered = markedAndCovered; this.segmentationName = segmentationName; this.htmlID = htmlID; this.resultID = resultID; this.progress = new ProgressBar(); this.progress.setIndeterminate(true); this.progress.setVisible(false); this.progress.setEnabled(false); this.addStyleName(ChameleonTheme.PANEL_BORDERLESS); this.setWidth("100%"); if (entry != null && ps != null) { visPlugin = ps.getVisualizer(entry.getVisType()); if (visPlugin == null) { // fallback to default visualizer if original vis type was not found entry.setVisType(PluginSystem.DEFAULT_VISUALIZER); visPlugin = ps.getVisualizer(entry.getVisType()); } if (HIDDEN.equalsIgnoreCase(entry.getVisibility())) { // build button for visualizer btEntry = new Button(entry.getDisplayName()); btEntry.setIcon(ICON_EXPAND); btEntry.setStyleName(ChameleonTheme.BUTTON_BORDERLESS + " " + ChameleonTheme.BUTTON_SMALL); btEntry.addClickListener((Button.ClickListener) this); btEntry.setDisableOnClick(true); addComponent(btEntry); addComponent(progress); } else { if (ISVISIBLE.equalsIgnoreCase(entry.getVisibility()) || PRELOADED.equalsIgnoreCase(entry.getVisibility())) { // build button for visualizer btEntry = new Button(entry.getDisplayName()); btEntry.setIcon(ICON_COLLAPSE); btEntry.setStyleName(ChameleonTheme.BUTTON_BORDERLESS + " " + ChameleonTheme.BUTTON_SMALL); btEntry.addClickListener((Button.ClickListener) this); addComponent(btEntry); } addComponent(progress); // create the visualizer and calc input try { vis = createComponent(); if (vis != null) { vis.setVisible(true); addComponent(vis); } } catch (Exception ex) { Notification.show("Could not create visualizer " + visPlugin.getShortName(), ex.toString(), Notification.Type.TRAY_NOTIFICATION); log.error("Could not create visualizer " + visPlugin.getShortName(), ex); } if (btEntry != null && PRELOADED.equalsIgnoreCase(entry.getVisibility())) { btEntry.setIcon(ICON_EXPAND); if (vis != null) { vis.setVisible(false); } } } } // end if entry not null }
From source file:cirad.cgh.vcf2fasta.view.Vcf2fastaForm.java
License:Open Source License
private Component getProgressLayout() { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true);/* www. j a v a 2 s. co m*/ status = new Label(""); layout.addComponent(this.status); progress = new ProgressBar(); progress.setEnabled(false); progress.setVisible(false); layout.addComponent(progress); return layout; }
From source file:com.cavisson.gui.dashboard.components.controls.Sliders.java
License:Apache License
public Sliders() { setMargin(true);/*from w ww . j a v a 2 s. c o m*/ Label h1 = new Label("Sliders"); h1.addStyleName("h1"); addComponent(h1); HorizontalLayout row = new HorizontalLayout(); row.addStyleName("wrapping"); row.setSpacing(true); addComponent(row); Slider slider = new Slider("Horizontal"); slider.setValue(50.0); row.addComponent(slider); slider = new Slider("Horizontal, sized"); slider.setValue(50.0); slider.setWidth("200px"); row.addComponent(slider); slider = new Slider("Custom handle"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color1"); row.addComponent(slider); slider = new Slider("Custom track"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color2"); row.addComponent(slider); slider = new Slider("Custom indicator"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color3"); row.addComponent(slider); slider = new Slider("No indicator"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("no-indicator"); row.addComponent(slider); slider = new Slider("With ticks (not in IE8 & IE9)"); slider.setValue(3.0); slider.setWidth("200px"); slider.setMax(4); slider.addStyleName("ticks"); row.addComponent(slider); slider = new Slider("Toggle imitation"); slider.setWidth("50px"); slider.setResolution(0); slider.setMin(0); slider.setMax(1); row.addComponent(slider); slider = new Slider("Vertical"); slider.setValue(50.0); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Vertical, sized"); slider.setValue(50.0); slider.setOrientation(SliderOrientation.VERTICAL); slider.setHeight("200px"); row.addComponent(slider); slider = new Slider("Custom handle"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color1"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Custom track"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color2"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Custom indicator"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color3"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("No indicator"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("no-indicator"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("With ticks"); slider.setValue(3.0); slider.setHeight("200px"); slider.setMax(4); slider.addStyleName("ticks"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Disabled"); slider.setValue(50.0); slider.setEnabled(false); row.addComponent(slider); h1 = new Label("Progress Bars"); h1.addStyleName("h1"); addComponent(h1); row = new HorizontalLayout(); row.addStyleName("wrapping"); row.setSpacing(true); addComponent(row); pb = new ProgressBar(); pb.setCaption("Default"); pb.setWidth("300px"); // pb.setValue(0.6f); row.addComponent(pb); pb2 = new ProgressBar(); pb2.setCaption("Point style"); pb2.setWidth("300px"); pb2.addStyleName("point"); // pb2.setValue(0.6f); row.addComponent(pb2); if (!ValoThemeUI.isTestMode()) { ProgressBar pb3 = new ProgressBar(); pb3.setIndeterminate(true); pb3.setCaption("Indeterminate"); row.addComponent(pb3); } }
From source file:com.cavisson.gui.dashboard.components.controls.Tables.java
License:Apache License
static void configure(Table table, boolean footer, boolean sized, boolean expandRatios, boolean stripes, boolean verticalLines, boolean horizontalLines, boolean borderless, boolean headers, boolean compact, boolean small, boolean rowIndex, boolean rowCaption, boolean rowIcon, boolean componentsInRows) { table.setSelectable(true);/* ww w . ja v a 2s . c o m*/ table.setMultiSelect(true); table.setSortEnabled(true); table.setColumnCollapsingAllowed(true); table.setColumnReorderingAllowed(true); table.setPageLength(6); table.addActionHandler(ValoThemeUI.getActionHandler()); table.setDragMode(TableDragMode.MULTIROW); table.setDropHandler(new DropHandler() { @Override public AcceptCriterion getAcceptCriterion() { return AcceptAll.get(); } @Override public void drop(DragAndDropEvent event) { Notification.show(event.getTransferable().toString()); } }); table.setColumnAlignment(ValoThemeUI.DESCRIPTION_PROPERTY, Align.RIGHT); table.setColumnAlignment(ValoThemeUI.INDEX_PROPERTY, Align.CENTER); table.removeContainerProperty("textfield"); table.removeGeneratedColumn("textfield"); table.removeContainerProperty("button"); table.removeGeneratedColumn("button"); table.removeContainerProperty("label"); table.removeGeneratedColumn("label"); table.removeContainerProperty("checkbox"); table.removeGeneratedColumn("checkbox"); table.removeContainerProperty("datefield"); table.removeGeneratedColumn("datefield"); table.removeContainerProperty("combobox"); table.removeGeneratedColumn("combobox"); table.removeContainerProperty("optiongroup"); table.removeGeneratedColumn("optiongroup"); table.removeContainerProperty("slider"); table.removeGeneratedColumn("slider"); table.removeContainerProperty("progress"); table.removeGeneratedColumn("progress"); if (componentsInRows) { table.addContainerProperty("textfield", TextField.class, null); table.addGeneratedColumn("textfield", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { TextField tf = new TextField(); tf.setInputPrompt("Type here"); // tf.addStyleName("compact"); if ((Integer) itemId % 2 == 0) { tf.addStyleName("borderless"); } return tf; } }); table.addContainerProperty("datefield", TextField.class, null); table.addGeneratedColumn("datefield", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { DateField tf = new DateField(); tf.addStyleName("compact"); if ((Integer) itemId % 2 == 0) { tf.addStyleName("borderless"); } return tf; } }); table.addContainerProperty("combobox", TextField.class, null); table.addGeneratedColumn("combobox", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { ComboBox tf = new ComboBox(); tf.setInputPrompt("Select"); tf.addStyleName("compact"); if ((Integer) itemId % 2 == 0) { tf.addStyleName("borderless"); } return tf; } }); table.addContainerProperty("button", Button.class, null); table.addGeneratedColumn("button", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { Button b = new Button("Button"); b.addStyleName("small"); return b; } }); table.addContainerProperty("label", TextField.class, null); table.addGeneratedColumn("label", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { Label label = new Label("Label component"); label.setSizeUndefined(); label.addStyleName("bold"); return label; } }); table.addContainerProperty("checkbox", TextField.class, null); table.addGeneratedColumn("checkbox", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { CheckBox cb = new CheckBox(null, true); return cb; } }); table.addContainerProperty("optiongroup", TextField.class, null); table.addGeneratedColumn("optiongroup", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { OptionGroup op = new OptionGroup(); op.addItem("Male"); op.addItem("Female"); op.addStyleName("horizontal"); return op; } }); table.addContainerProperty("slider", TextField.class, null); table.addGeneratedColumn("slider", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { Slider s = new Slider(); s.setValue(30.0); return s; } }); table.addContainerProperty("progress", TextField.class, null); table.addGeneratedColumn("progress", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { ProgressBar bar = new ProgressBar(); bar.setValue(0.7f); return bar; } }); } table.setFooterVisible(footer); if (footer) { table.setColumnFooter(ValoThemeUI.CAPTION_PROPERTY, "caption"); table.setColumnFooter(ValoThemeUI.DESCRIPTION_PROPERTY, "description"); table.setColumnFooter(ValoThemeUI.ICON_PROPERTY, "icon"); table.setColumnFooter(ValoThemeUI.INDEX_PROPERTY, "index"); } if (sized) { table.setWidth("400px"); table.setHeight("300px"); } else { table.setSizeUndefined(); } if (expandRatios) { if (!sized) { table.setWidth("100%"); } } table.setColumnExpandRatio(ValoThemeUI.CAPTION_PROPERTY, expandRatios ? 1.0f : 0); table.setColumnExpandRatio(ValoThemeUI.DESCRIPTION_PROPERTY, expandRatios ? 1.0f : 0); if (!stripes) { table.addStyleName("no-stripes"); } else { table.removeStyleName("no-stripes"); } if (!verticalLines) { table.addStyleName("no-vertical-lines"); } else { table.removeStyleName("no-vertical-lines"); } if (!horizontalLines) { table.addStyleName("no-horizontal-lines"); } else { table.removeStyleName("no-horizontal-lines"); } if (borderless) { table.addStyleName("borderless"); } else { table.removeStyleName("borderless"); } if (!headers) { table.addStyleName("no-header"); } else { table.removeStyleName("no-header"); } if (compact) { table.addStyleName("compact"); } else { table.removeStyleName("compact"); } if (small) { table.addStyleName("small"); } else { table.removeStyleName("small"); } if (!rowIndex && !rowCaption && rowIcon) { table.setRowHeaderMode(RowHeaderMode.HIDDEN); } if (rowIndex) { table.setRowHeaderMode(RowHeaderMode.INDEX); } if (rowCaption) { table.setRowHeaderMode(RowHeaderMode.PROPERTY); table.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY); } else { table.setItemCaptionPropertyId(null); } if (rowIcon) { table.setRowHeaderMode(RowHeaderMode.ICON_ONLY); table.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY); } else { table.setItemIconPropertyId(null); } }
From source file:com.cms.component.WindowProgress.java
public WindowProgress(String caption) { setClosable(false);/*from w ww . j a v a 2 s . c o m*/ setReadOnly(true); setResizable(false); setWidth("-1px"); setHeight("-1px"); setModal(true); // setStyleName("loading-window"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("-1px"); horizontalLayout.setHeight("-1px"); horizontalLayout.setSpacing(true); horizontalLayout.setMargin(true); pb = new ProgressBar(); pb.setIndeterminate(true); lb = new Label(); lb.setValue(BundleUtils.getString("Running")); horizontalLayout.addComponent(pb); horizontalLayout.addComponent(lb); setContent(horizontalLayout); }
From source file:com.cms.component.WindowProgress.java
public WindowProgress() { setClosable(false);//from w w w. j ava2 s . c om setReadOnly(true); setResizable(false); setWidth("-1px"); setHeight("-1px"); setModal(true); // setStyleName("loading-window"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("-1px"); horizontalLayout.setHeight("-1px"); horizontalLayout.setSpacing(true); horizontalLayout.setMargin(true); pb = new ProgressBar(); pb.setIndeterminate(true); lb = new Label(); lb.setValue(BundleUtils.getString("Running")); horizontalLayout.addComponent(pb); horizontalLayout.addComponent(lb); setContent(horizontalLayout); }
From source file:com.esofthead.mycollab.mobile.module.project.ui.form.field.ProjectFormAttachmentUploadField.java
License:Open Source License
public ProjectFormAttachmentUploadField() { resourceService = ApplicationContextUtil.getSpringBean(ResourceService.class); currentPollInterval = UI.getCurrent().getPollInterval(); receiver = createReceiver();//from www. j av a 2 s. c o m attachmentBtn = new MultiUpload(); attachmentBtn.setButtonCaption("Select File(s)"); attachmentBtn.setImmediate(true); MultiUploadHandler handler = new MultiUploadHandler() { private LinkedList<ProgressBar> indicators; @Override public void streamingStarted(StreamVariable.StreamingStartEvent event) { } @Override public void streamingFinished(StreamVariable.StreamingEndEvent event) { String tempName = event.getFileName(); final String fileName; int index = tempName.lastIndexOf("."); if (index > 0) { String fileExt = tempName.substring(index + 1, tempName.length()); fileName = MobileAttachmentUtils.ATTACHMENT_NAME_PREFIX + System.currentTimeMillis() + "." + fileExt; } else { fileName = MobileAttachmentUtils.ATTACHMENT_NAME_PREFIX + System.currentTimeMillis(); } if (!indicators.isEmpty()) { rowWrap.replaceComponent(indicators.remove(0), MobileAttachmentUtils.renderAttachmentFieldRow( MobileAttachmentUtils.constructContent(fileName, attachmentPath), new Button.ClickListener() { private static final long serialVersionUID = 581451358291203810L; @Override public void buttonClick(Button.ClickEvent event) { fileStores.remove(fileName); } })); } if (indicators.size() == 0) { UI.getCurrent().setPollInterval(currentPollInterval); } File file = receiver.getFile(); receiveFile(file, fileName, event.getMimeType(), event.getBytesReceived()); receiver.setValue(null); } @Override public void streamingFailed(StreamVariable.StreamingErrorEvent event) { if (!indicators.isEmpty()) { Label uploadResult = new Label("Upload failed! File: " + event.getFileName()); uploadResult.setStyleName("upload-status"); rowWrap.replaceComponent(indicators.remove(0), uploadResult); } } @Override public void onProgress(StreamVariable.StreamingProgressEvent event) { long readBytes = event.getBytesReceived(); long contentLength = event.getContentLength(); float f = (float) readBytes / (float) contentLength; indicators.get(0).setValue(f); } @Override public OutputStream getOutputStream() { MultiUpload.FileDetail next = attachmentBtn.getPendingFileNames().iterator().next(); return receiver.receiveUpload(next.getFileName(), next.getMimeType()); } @Override public void filesQueued(Collection<MultiUpload.FileDetail> pendingFileNames) { UI.getCurrent().setPollInterval(500); if (indicators == null) { indicators = new LinkedList<ProgressBar>(); } for (MultiUpload.FileDetail f : pendingFileNames) { ProgressBar pi = new ProgressBar(); pi.setValue(0f); pi.setStyleName("upload-progress"); pi.setWidth("100%"); rowWrap.addComponentAsFirst(pi); pi.setEnabled(true); pi.setVisible(true); indicators.add(pi); } } @Override public boolean isInterrupted() { return false; } }; attachmentBtn.setHandler(handler); fileStores = new HashMap<String, File>(); constructUI(); }
From source file:com.esofthead.mycollab.mobile.module.project.ui.ProjectCommentInput.java
License:Open Source License
private void prepareUploadField() { receiver = createReceiver();/*from ww w. jav a 2 s. c o m*/ uploadField = new MultiUpload(); uploadField.setButtonCaption(""); uploadField.setImmediate(true); MultiUploadHandler handler = new MultiUploadHandler() { private LinkedList<ProgressBar> indicators; @Override public void streamingStarted(StreamVariable.StreamingStartEvent event) { } @Override public void streamingFinished(StreamVariable.StreamingEndEvent event) { String fileName = event.getFileName(); int index = fileName.lastIndexOf("."); if (index > 0) { String fileExt = fileName.substring(index + 1, fileName.length()); fileName = MobileAttachmentUtils.ATTACHMENT_NAME_PREFIX + System.currentTimeMillis() + "." + fileExt; } if (!indicators.isEmpty()) { statusWrapper.replaceComponent(indicators.remove(0), createAttachmentRow(fileName)); } if (indicators.size() == 0) { UI.getCurrent().setPollInterval(currentPollInterval); } File file = receiver.getFile(); receiveFile(file, fileName, event.getMimeType(), event.getBytesReceived()); receiver.setValue(null); } @Override public void streamingFailed(StreamVariable.StreamingErrorEvent event) { if (!indicators.isEmpty()) { Label uploadResult = new Label("Upload failed! File: " + event.getFileName()); uploadResult.setStyleName("upload-status"); statusWrapper.replaceComponent(indicators.remove(0), uploadResult); } } @Override public void onProgress(StreamVariable.StreamingProgressEvent event) { long readBytes = event.getBytesReceived(); long contentLength = event.getContentLength(); float f = (float) readBytes / (float) contentLength; indicators.get(0).setValue(f); } @Override public OutputStream getOutputStream() { MultiUpload.FileDetail next = uploadField.getPendingFileNames().iterator().next(); return receiver.receiveUpload(next.getFileName(), next.getMimeType()); } @Override public void filesQueued(Collection<MultiUpload.FileDetail> pendingFileNames) { UI.getCurrent().setPollInterval(500); if (indicators == null) { indicators = new LinkedList<ProgressBar>(); } for (MultiUpload.FileDetail f : pendingFileNames) { ProgressBar pi = new ProgressBar(); pi.setValue(0f); pi.setStyleName("upload-progress"); pi.setWidth("100%"); statusWrapper.addComponent(pi); pi.setEnabled(true); pi.setVisible(true); indicators.add(pi); } } @Override public boolean isInterrupted() { return false; } }; uploadField.setHandler(handler); }
From source file:com.esofthead.mycollab.vaadin.web.ui.ProgressBarIndicator.java
License:Open Source License
public ProgressBarIndicator() { super("progressBar"); this.progressIndicator = new ProgressBar(); this.progressIndicator.setWidth("100%"); this.progressStatusLabel = new Label(); this.progressStatusLabel.setWidth("100%"); this.progressStatusLabel.setHeight("100%"); this.addComponent(this.progressIndicator, "progressbar-container"); this.addComponent(this.progressStatusLabel, "progressbar-status"); }
From source file:com.etest.valo.Sliders.java
License:Apache License
public Sliders() { setMargin(true);/* ww w.ja va 2 s . co m*/ Label h1 = new Label("Sliders"); h1.addStyleName("h1"); addComponent(h1); HorizontalLayout row = new HorizontalLayout(); row.addStyleName("wrapping"); row.setSpacing(true); addComponent(row); Slider slider = new Slider("Horizontal"); slider.setValue(50.0); row.addComponent(slider); slider = new Slider("Horizontal, sized"); slider.setValue(50.0); slider.setWidth("200px"); row.addComponent(slider); slider = new Slider("Custom handle"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color1"); row.addComponent(slider); slider = new Slider("Custom track"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color2"); row.addComponent(slider); slider = new Slider("Custom indicator"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("color3"); row.addComponent(slider); slider = new Slider("No indicator"); slider.setValue(50.0); slider.setWidth("200px"); slider.addStyleName("no-indicator"); row.addComponent(slider); slider = new Slider("With ticks (not in IE8 & IE9)"); slider.setValue(3.0); slider.setWidth("200px"); slider.setMax(4); slider.addStyleName("ticks"); row.addComponent(slider); slider = new Slider("Toggle imitation"); slider.setWidth("50px"); slider.setResolution(0); slider.setMin(0); slider.setMax(1); row.addComponent(slider); slider = new Slider("Vertical"); slider.setValue(50.0); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Vertical, sized"); slider.setValue(50.0); slider.setOrientation(SliderOrientation.VERTICAL); slider.setHeight("200px"); row.addComponent(slider); slider = new Slider("Custom handle"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color1"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Custom track"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color2"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Custom indicator"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("color3"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("No indicator"); slider.setValue(50.0); slider.setHeight("200px"); slider.addStyleName("no-indicator"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("With ticks"); slider.setValue(3.0); slider.setHeight("200px"); slider.setMax(4); slider.addStyleName("ticks"); slider.setOrientation(SliderOrientation.VERTICAL); row.addComponent(slider); slider = new Slider("Disabled"); slider.setValue(50.0); slider.setEnabled(false); row.addComponent(slider); h1 = new Label("Progress Bars"); h1.addStyleName("h1"); addComponent(h1); row = new HorizontalLayout(); row.addStyleName("wrapping"); row.setSpacing(true); addComponent(row); pb = new ProgressBar(); pb.setCaption("Default"); pb.setWidth("300px"); // pb.setValue(0.6f); row.addComponent(pb); pb2 = new ProgressBar(); pb2.setCaption("Point style"); pb2.setWidth("300px"); pb2.addStyleName("point"); // pb2.setValue(0.6f); row.addComponent(pb2); if (!MainUI.isTestMode()) { ProgressBar pb3 = new ProgressBar(); pb3.setIndeterminate(true); pb3.setCaption("Indeterminate"); row.addComponent(pb3); } }