List of usage examples for com.vaadin.ui VerticalSplitPanel addComponent
@Override public void addComponent(Component c)
From source file:org.jumpmind.metl.ui.views.design.EditFlowPanel.java
License:Open Source License
public EditFlowPanel(ApplicationContext context, String flowId, DesignNavigator designNavigator, TabbedPanel tabs) {// ww w .ja v a 2 s . com this.configurationService = context.getConfigurationService(); this.flow = configurationService.findFlow(flowId); this.readOnly = context.isReadOnly(configurationService.findProjectVersion(flow.getProjectVersionId()), Privilege.DESIGN); this.context = context; this.tabs = tabs; this.designNavigator = designNavigator; this.propertySheet = new PropertySheet(context, tabs, readOnly); this.propertySheet.setListener((components) -> { List<FlowStep> steps = new ArrayList<FlowStep>(); for (Component c : components) { steps.add(EditFlowPanel.this.flow.findFlowStepWithComponentId(c.getId())); } refreshStepOnDiagram(steps); }); this.propertySheet.setCaption("Property Sheet"); this.componentPalette = new EditFlowPalette(this, context, flow.getProjectVersionId()); addComponent(componentPalette); VerticalLayout rightLayout = new VerticalLayout(); rightLayout.setSizeFull(); rightLayout.addComponent(buildButtonBar()); VerticalSplitPanel splitPanel = new VerticalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setSplitPosition(50, Unit.PERCENTAGE); diagramLayout = new VerticalLayout(); diagramLayout.setWidth(10000, Unit.PIXELS); diagramLayout.setHeight(10000, Unit.PIXELS); DragAndDropWrapper wrapper = new DragAndDropWrapper(diagramLayout); wrapper.setSizeUndefined(); wrapper.setDropHandler(new DropHandler()); flowPanel = new Panel(); flowPanel.setSizeFull(); flowPanel.addStyleName(ValoTheme.PANEL_WELL); flowPanel.setContent(wrapper); splitPanel.addComponent(flowPanel); splitPanel.addComponent(propertySheet); rightLayout.addComponent(splitPanel); rightLayout.setExpandRatio(splitPanel, 1); addComponent(rightLayout); setExpandRatio(rightLayout, 1); if (flow.getFlowSteps().size() > 0) { selected = new ArrayList<AbstractObject>(); selected.add(flow.getFlowSteps().get(0)); propertySheet.setSource(selected); } redrawFlow(); }