Search in sources :

Example 1 with DistributionDisplaySettingHandler

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);
}
Also used : QueryId(de.catma.queryengine.QueryId) VegaPanel(de.catma.ui.module.analyze.visualization.vega.VegaPanel) DistributionDisplaySettingHandler(de.catma.ui.module.analyze.visualization.vega.DistributionDisplaySettingHandler) QueryOptions(de.catma.queryengine.QueryOptions)

Aggregations

QueryId (de.catma.queryengine.QueryId)1 QueryOptions (de.catma.queryengine.QueryOptions)1 DistributionDisplaySettingHandler (de.catma.ui.module.analyze.visualization.vega.DistributionDisplaySettingHandler)1 VegaPanel (de.catma.ui.module.analyze.visualization.vega.VegaPanel)1