Search in sources :

Example 1 with PieVizModel

use of org.knime.base.node.viz.pie.datamodel.PieVizModel in project knime-core by knime.

the class PiePlotter method clearSelection.

/**
 * {@inheritDoc}
 */
@Override
public void clearSelection() {
    final PieVizModel vizModel = getVizModel();
    if (vizModel == null) {
        return;
    }
    vizModel.clearSelection();
    repaint();
}
Also used : PieVizModel(org.knime.base.node.viz.pie.datamodel.PieVizModel)

Example 2 with PieVizModel

use of org.knime.base.node.viz.pie.datamodel.PieVizModel in project knime-core by knime.

the class PiePlotter method unHiLiteSelected.

/**
 * {@inheritDoc}
 */
@Override
public void unHiLiteSelected() {
    final PieVizModel vizModel = getVizModel();
    if (vizModel == null || !vizModel.supportsHiliting()) {
        LOGGER.debug("VizModel doesn't support hiliting or was null");
        return;
    }
    final Set<RowKey> selectedKeys = vizModel.getSelectedKeys();
    delegateUnHiLite(selectedKeys);
    repaint();
}
Also used : PieVizModel(org.knime.base.node.viz.pie.datamodel.PieVizModel) RowKey(org.knime.core.data.RowKey)

Example 3 with PieVizModel

use of org.knime.base.node.viz.pie.datamodel.PieVizModel in project knime-core by knime.

the class PiePlotter method updateSize.

/**
 * {@inheritDoc}
 */
@Override
public void updateSize() {
    final PieVizModel vizModel = getVizModel();
    if (vizModel == null) {
        LOGGER.debug("VizModel was null");
        return;
    }
    final Dimension newDrawingSpace = getDrawingPaneDimension();
    if (vizModel.setDrawingSpace(newDrawingSpace)) {
        updatePaintModel();
    }
}
Also used : PieVizModel(org.knime.base.node.viz.pie.datamodel.PieVizModel) Dimension(java.awt.Dimension)

Example 4 with PieVizModel

use of org.knime.base.node.viz.pie.datamodel.PieVizModel in project knime-core by knime.

the class PiePlotter method unHiLite.

/**
 * {@inheritDoc}
 */
@Override
public void unHiLite(final KeyEvent event) {
    final PieVizModel vizModel = getVizModel();
    if (vizModel == null || !vizModel.supportsHiliting()) {
        LOGGER.debug("VizModel doesn't support hiliting or was null");
        return;
    }
    final Set<RowKey> hilited = event.keys();
    vizModel.updateHiliteInfo(hilited, false);
    repaint();
}
Also used : PieVizModel(org.knime.base.node.viz.pie.datamodel.PieVizModel) RowKey(org.knime.core.data.RowKey)

Example 5 with PieVizModel

use of org.knime.base.node.viz.pie.datamodel.PieVizModel in project knime-core by knime.

the class PiePlotter method hiLite.

/**
 * {@inheritDoc}
 */
@Override
public void hiLite(final KeyEvent event) {
    final PieVizModel vizModel = getVizModel();
    if (vizModel == null || !vizModel.supportsHiliting()) {
        LOGGER.debug("VizModel doesn't support hiliting or was null");
        return;
    }
    final Set<RowKey> hilited = event.keys();
    vizModel.updateHiliteInfo(hilited, true);
    repaint();
}
Also used : PieVizModel(org.knime.base.node.viz.pie.datamodel.PieVizModel) RowKey(org.knime.core.data.RowKey)

Aggregations

PieVizModel (org.knime.base.node.viz.pie.datamodel.PieVizModel)11 RowKey (org.knime.core.data.RowKey)4 Dimension (java.awt.Dimension)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 ItemEvent (java.awt.event.ItemEvent)1 ItemListener (java.awt.event.ItemListener)1 JSlider (javax.swing.JSlider)1 ChangeEvent (javax.swing.event.ChangeEvent)1 ChangeListener (javax.swing.event.ChangeListener)1 AggregationMethod (org.knime.base.node.viz.aggregation.AggregationMethod)1 AbstractDrawingPane (org.knime.base.node.viz.plotter.AbstractDrawingPane)1