private LayoutContainer createContentContainer() { LayoutContainer contentContainer = new LayoutContainer(); contentContainer.setBorders(false); contentContainer.setSize(340, 170); HBoxLayout tabbarContainerLayout = new HBoxLayout(); tabbarContainerLayout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP); contentContainer.setLayout(tabbarContainerLayout); LayoutContainer contentItemsContainer = new LayoutContainer(); contentItemsContainer.setBorders(true); contentItemsContainer.setWidth(230); contentItemsContainer.setHeight(160); contentItemsContainer.setLayout(new FitLayout()); contentItemsContainer.setStyleAttribute("backgroundColor", "white"); // overflow-auto style is for IE hack. contentItemsContainer.addStyleName("overflow-auto"); TreeStore<BeanModel> deviceContentTreeStore = new TreeStore<BeanModel>(); deviceContentTree = TreePanelBuilder.buildDeviceContentTree(deviceContentTreeStore); contentItemsContainer.add(deviceContentTree); LayoutContainer buttonsContainer = new LayoutContainer(); buttonsContainer.setSize(110, 160); buttonsContainer.setBorders(false); buttonsContainer.setLayout(new RowLayout(Orientation.VERTICAL)); Button addCommandBtn = new Button("Add command"); addCommandBtn.addSelectionListener(new AddCommandListener()); Button addSensorBtn = new Button("Add sensor"); addSensorBtn.addSelectionListener(new AddSensorListener()); Button addSwitchBtn = new Button("Add switch"); addSwitchBtn.addSelectionListener(new AddSwitchListener()); Button addSliderBtn = new Button("Add slider"); addSliderBtn.addSelectionListener(new AddSliderListener()); Button deleteBtn = new Button("Delete"); deleteBtn.addSelectionListener(new DeleteContentListener()); buttonsContainer.add(addCommandBtn, new RowData(110, -1, new Margins(5))); buttonsContainer.add(addSensorBtn, new RowData(110, -1, new Margins(5))); buttonsContainer.add(addSwitchBtn, new RowData(110, -1, new Margins(5))); buttonsContainer.add(addSliderBtn, new RowData(110, -1, new Margins(5))); buttonsContainer.add(deleteBtn, new RowData(110, -1, new Margins(5))); contentContainer.add(contentItemsContainer); contentContainer.add(buttonsContainer); return contentContainer; }