Search in sources :

Example 1 with InteractivePieVizModel

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

the class InteractivePiePlotter method setAggregationColumn.

/**
 * @param colName the name of the new aggregation column
 */
protected void setAggregationColumn(final String colName) {
    if (m_ignoreChanges) {
        return;
    }
    final InteractivePieVizModel vizModel = getVizModel();
    if (vizModel == null) {
        throw new NullPointerException("vizModel must not be null");
    }
    // update the properties panel as well
    final InteractivePieProperties properties = getPropertiesPanel();
    if (properties == null) {
        throw new NullPointerException("Properties must not be null");
    }
    boolean changed = true;
    try {
        changed = vizModel.setAggrColumn(colName);
        resetInfoMsg();
    } catch (final TooManySectionsException e) {
        setInfoMsg(e.getMessage());
    }
    if (changed) {
        modelChanged();
    }
}
Also used : InteractivePieVizModel(org.knime.base.node.viz.pie.datamodel.interactive.InteractivePieVizModel) TooManySectionsException(org.knime.base.node.viz.pie.util.TooManySectionsException)

Example 2 with InteractivePieVizModel

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

the class InteractivePiePlotter method setPieColumn.

/**
 * @param colName the name of the new pie column
 */
protected void setPieColumn(final String colName) {
    if (m_ignoreChanges) {
        return;
    }
    final InteractivePieVizModel vizModel = getVizModel();
    if (vizModel == null) {
        throw new NullPointerException("vizModel must not be null");
    }
    boolean changed = true;
    try {
        changed = vizModel.setPieColumn(colName);
        resetInfoMsg();
    } catch (final TooManySectionsException e) {
        setInfoMsg(e.getMessage());
    }
    if (changed) {
        modelChanged();
    }
}
Also used : InteractivePieVizModel(org.knime.base.node.viz.pie.datamodel.interactive.InteractivePieVizModel) TooManySectionsException(org.knime.base.node.viz.pie.util.TooManySectionsException)

Aggregations

InteractivePieVizModel (org.knime.base.node.viz.pie.datamodel.interactive.InteractivePieVizModel)2 TooManySectionsException (org.knime.base.node.viz.pie.util.TooManySectionsException)2