@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(false); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // sliderView sliderView = new SliderView(); sliderView.setImmediate(false); sliderView.setWidth("100.0%"); sliderView.setHeight("100.0%"); mainLayout.addComponent(sliderView); mainLayout.setExpandRatio(sliderView, 1.0f); return mainLayout; }
@SuppressWarnings("unused") @PostConstruct private void createViews() { // initialize thread local bundle services threadSequenceService.set(sequenceService); threadAddressService.set(addressService); threadClientService.set(clientService); threadClientTypeService.set(clientTypeService); threadClientGroupService.set(clientGroupService); threadClientKnowledgeService.set(clientKnowledgeService); // add all views controlled by SliderView Component clientView = new ClientView(context, this); sliderView.addView(clientView); views.put(0, clientView); }
@Override public void addListener(IViewChangeListener listener) { sliderView.addListener(listener); }
@Override public IView getSelectedView() { return sliderView.getSelectedView(); }