use of de.catma.ui.module.analyze.visualization.vega.DistributionDisplaySettingHandler in project catma by forTEXT.
the class AnalyzeView method addDistViz.
private void addDistViz() {
if (getQueryResultPanelSettings().isEmpty()) {
Notification.show("Info", "Please query some data first!", Type.HUMANIZED_MESSAGE);
return;
}
VegaPanel vegaPanel = new VegaPanel(eventBus, project, kwicProviderCache, () -> new QueryOptions(// TODO: ok?
new QueryId(""), currentCorpus.getDocumentIds(), currentCorpus.getCollectionIds(), indexInfoSet.getUnseparableCharacterSequences(), indexInfoSet.getUserDefinedSeparatingCharacters(), indexInfoSet.getLocale(), project), new DistributionDisplaySettingHandler());
String name = "Distribution Chart " + LocalDateTime.now().format(DateTimeFormatter.ofLocalizedTime(FormatStyle.MEDIUM));
VizMaxPanel vizMaxPanel = new VizMaxPanel(name, vegaPanel, getQueryResultPanelSettings(), project, kwicProviderCache, closedVizMaxPanel -> setContent(contentPanel, closedVizMaxPanel));
VizMinPanel vizMinPanel = new VizMinPanel(name, vizMaxPanel, toBeRemovedVizMinPanel -> vizCardsPanel.removeComponent(toBeRemovedVizMinPanel), () -> setContent(vizMaxPanel, contentPanel));
vizCardsPanel.addComponentAsFirst(vizMinPanel);
setContent(vizMaxPanel, contentPanel);
}
Aggregations