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);
}
}