Search in sources :

Example 1 with BarChartType

use of org.cytoscape.ding.internal.charts.bar.BarChart.BarChartType in project cytoscape-impl by cytoscape.

the class BarChartEditor method updateType.

protected void updateType() {
    final BarChartType type = chart.get(BarChart.TYPE, BarChartType.class, BarChartType.GROUPED);
    final JRadioButton typeRd;
    if (type == BarChartType.STACKED)
        typeRd = getStackedRd();
    else if (type == BarChartType.HEAT_STRIPS)
        typeRd = getHeatStripsRd();
    else if (type == BarChartType.UP_DOWN)
        typeRd = getUpDownRd();
    else
        typeRd = getGroupedRd();
    getTypeGrp().setSelected(typeRd.getModel(), true);
}
Also used : JRadioButton(javax.swing.JRadioButton) BarChartType(org.cytoscape.ding.internal.charts.bar.BarChart.BarChartType)

Example 2 with BarChartType

use of org.cytoscape.ding.internal.charts.bar.BarChart.BarChartType in project cytoscape-impl by cytoscape.

the class BarChartEditor method setType.

private void setType() {
    final BarChartType type;
    if (getStackedRd().isSelected())
        type = BarChartType.STACKED;
    else if (getHeatStripsRd().isSelected())
        type = BarChartType.HEAT_STRIPS;
    else if (getUpDownRd().isSelected())
        type = BarChartType.UP_DOWN;
    else
        type = BarChartType.GROUPED;
    chart.set(BarChart.TYPE, type);
    updateRangeMinMax(true);
    getColorSchemeEditor().setColorSchemes(getColorSchemes());
}
Also used : BarChartType(org.cytoscape.ding.internal.charts.bar.BarChart.BarChartType)

Aggregations

BarChartType (org.cytoscape.ding.internal.charts.bar.BarChart.BarChartType)2 JRadioButton (javax.swing.JRadioButton)1