Search in sources :

Example 1 with VegaPanel

use of de.catma.ui.module.analyze.visualization.vega.VegaPanel 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)

Example 2 with VegaPanel

use of de.catma.ui.module.analyze.visualization.vega.VegaPanel in project catma by forTEXT.

the class AnalyzeView method addWCViz.

private void addWCViz() {
    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 WordCloudDisplaySettingHandler());
    String name = "Wordcloud " + 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) WordCloudDisplaySettingHandler(de.catma.ui.module.analyze.visualization.vega.WordCloudDisplaySettingHandler) VegaPanel(de.catma.ui.module.analyze.visualization.vega.VegaPanel) QueryOptions(de.catma.queryengine.QueryOptions)

Aggregations

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