use of java.awt.CardLayout in project knime-core by knime.
the class MissingValueHandlerFactorySelectionPanel method actionPerformed.
/**
* {@inheritDoc}
*/
@Override
public void actionPerformed(final ActionEvent e) {
MissingCellHandlerFactory fac = getSelectedFactory();
if (fac.hasSettingsPanel()) {
// Show card layout panel and activate the correct settings panel
m_argumentsPanel.setVisible(true);
String key = fac.getID();
((CardLayout) m_argumentsPanel.getLayout()).show(m_argumentsPanel, key);
} else {
// If the factory has no settings panel, we can hide the card layout panel.
m_argumentsPanel.setVisible(false);
}
firePropertyChange(SELECTED_FACTORY_CHANGE, null, null);
}
use of java.awt.CardLayout in project knime-core by knime.
the class TemplatesPanel method onSelectionInTemplateList.
private void onSelectionInTemplateList(final Object selected) {
CardLayout cl = (CardLayout) (m_previewPane.getLayout());
if (selected != null) {
@SuppressWarnings("unchecked") T template = (T) selected;
m_description.setText(template.getDescription());
m_description.setCaretPosition(0);
boolean removeable = m_provider.isRemoveable(template);
m_removeTemplateButton.setEnabled(removeable);
m_applyTemplateButton.setEnabled(true);
m_controller.setPreviewSettings(template);
cl.show(m_previewPane, CARD_PREVIEW);
this.validate();
} else {
m_description.setText("");
m_removeTemplateButton.setEnabled(false);
m_applyTemplateButton.setEnabled(false);
cl.show(m_previewPane, CARD_EMPTY_SELECTION);
}
}
Aggregations