public void actionPerformed(ActionEvent e) {
JComboBox source = (JComboBox) e.getSource();
if (source == policyAlgorithmCombo) {
Algorithms alg = (Algorithms) policyAlgorithmCombo.getSelectedItem();
DefaultComboBoxModel compatibleModes = dbModel.getCompatibleModes(alg);
currentPolicy.getAction().setAlgorithm(alg);
currentPolicy.getAction().setMode((Modes)compatibleModes.getElementAt(0));
if (((Modes) compatibleModes.getElementAt(0) == Modes.NONE) && (compatibleModes.getSize() == 1)) {
policyModeCombo.setVisible(false);