use of de.catma.ui.module.analyze.visualization.Visualization in project catma by forTEXT.
the class VizMaxPanel method initComponents.
private void initComponents(String name) {
setSizeFull();
setMargin(false);
HorizontalLayout titlePanel = new HorizontalLayout();
titlePanel.setMargin(false);
titlePanel.setWidth("100%");
nameLabel = new TextField(null, name);
nameLabel.addStyleName("viz-max-panel-name");
titlePanel.addComponent(nameLabel);
titlePanel.setComponentAlignment(nameLabel, Alignment.TOP_CENTER);
titlePanel.setExpandRatio(nameLabel, 1.f);
btMinViz = new IconButton(VaadinIcons.COMPRESS_SQUARE);
titlePanel.addComponent(btMinViz);
titlePanel.setComponentAlignment(btMinViz, Alignment.TOP_CENTER);
addComponent(titlePanel);
mainContentSplitPanel = new HorizontalSplitPanel();
mainContentSplitPanel.setSplitPosition(40, Sizeable.Unit.PERCENTAGE);
addComponent(mainContentSplitPanel);
setExpandRatio(mainContentSplitPanel, 1f);
// left column
VerticalSplitPanel resultSelectionSplitPanel = new VerticalSplitPanel();
mainContentSplitPanel.addComponent(resultSelectionSplitPanel);
// top left
topLeftPanel = new VerticalLayout();
topLeftPanel.setSizeFull();
topLeftPanel.setMargin(new MarginInfo(false, false, false, false));
resultSelectionSplitPanel.addComponent(topLeftPanel);
queryResultBox = new ComboBox<QuerySelection>();
queryResultBox.setWidth("100%");
queryResultBox.setEmptySelectionCaption("Select a resultset");
queryResultBox.setEmptySelectionAllowed(false);
queryResultBox.setItemCaptionGenerator(querySelection -> querySelection.getSetting().getQueryId().toString());
// bottom left
selectedResultsPanel = new QueryResultPanel(project, kwicProviderCache, DisplaySetting.GROUPED_BY_PHRASE, item -> handleItemRemoval(item));
selectedResultsPanel.addToButtonBarLeft(queryResultBox);
selectedResultsPanel.setSizeFull();
selectedResultsPanel.setMargin(new MarginInfo(false, false, false, false));
resultSelectionSplitPanel.addComponent(selectedResultsPanel);
// right column
mainContentSplitPanel.addComponent(visualization);
}
Aggregations