/** * This method gets called when a bound property is changed. * * @param evt A PropertyChangeEvent object describing the event source and the property that has * changed. */ public void propertyChange(final PropertyChangeEvent evt) { if (LegacyChartEditModel.CHART_EXPRESSION_PROPERTY.equals(evt.getPropertyName()) == false) { return; } final Expression o = (Expression) evt.getNewValue(); if (o == null) { chartPropertiesTableModel.setData(EMPTY_EXPRESSION); dataSourceTabbedPane.setEnabledAt(1, false); dataSourceTabbedPane.setSelectedIndex(0); return; } chartPropertiesTableModel.setData(new Expression[] {o}); final ChartType type = ChartType.getTypeByChartExpression(o.getClass()); if (type == null) { dataSourceTabbedPane.setEnabledAt(1, false); dataSourceTabbedPane.setSelectedIndex(0); return; } dataSourceTabbedPane.setEnabledAt(1, type.getSecondaryDataSourceProperty() != null); }