{
}
public void stateChanged(final ChangeEvent e)
{
final ElementPropertiesPanel attributeEditorPanel = getAttributeEditorPanel();
if (attributeEditorPanel == null)
{
return;
}
final ReportRenderContext activeContext = getContext().getActiveContext();
if (activeContext == null)
{
return;
}
final JTabbedPane tabs = (JTabbedPane) e.getSource();
if (tabs.getSelectedIndex() == 0)
{
attributeEditorPanel.setAllowAttributeCard(true);
attributeEditorPanel.setAllowDataSourceCard(false);
attributeEditorPanel.setAllowExpressionCard(false);
attributeEditorPanel.reset(activeContext.getSelectionModel());
}
else
{
attributeEditorPanel.setAllowAttributeCard(false);
attributeEditorPanel.setAllowDataSourceCard(true);
attributeEditorPanel.setAllowExpressionCard(true);
attributeEditorPanel.reset(activeContext.getSelectionModel());
}
}