diff options
author | Jonathan Bauer | 2019-02-25 15:44:43 +0100 |
---|---|---|
committer | Jonathan Bauer | 2019-02-25 15:44:43 +0100 |
commit | 18bea86a3d542cc293d0b5b90d4800971c203d46 (patch) | |
tree | a19c803afc8bc83d86d265a2679d0f9f770b45a1 /dozentenmodul | |
parent | [client] Fix tab enable/disable for lecture details window (diff) | |
download | tutor-module-18bea86a3d542cc293d0b5b90d4800971c203d46.tar.gz tutor-module-18bea86a3d542cc293d0b5b90d4800971c203d46.tar.xz tutor-module-18bea86a3d542cc293d0b5b90d4800971c203d46.zip |
[client] properly enable custom sat field
Diffstat (limited to 'dozentenmodul')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java index c71b2d0e..e3f68295 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java @@ -50,6 +50,19 @@ public class SatelliteListWindow extends SatelliteListWindowLayout implements Ui } } }; + + // deactivate the custom field when selecting a satellite to make things clearer for user + ActionListener listener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + txtCustomAddress.setEnabled(rdoCusomAddress.isSelected()); + } + }; + for (JRadioButton radio : radioToSat.keySet()) { + radio.addActionListener(listener); + } + rdoCusomAddress.addActionListener(listener); + // Check, whether we have any satellites String lastSat = Config.getLastSatellite(); if (satList != null && !satList.isEmpty()) { @@ -75,19 +88,6 @@ public class SatelliteListWindow extends SatelliteListWindowLayout implements Ui txtCustomAddress.requestFocus(); } - // deactivate the custom field when selecting a satellite to make things clearer for user - ActionListener listener = new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - txtCustomAddress.setEnabled(rdoCusomAddress.isSelected()); - } - }; - for (JRadioButton radio : radioToSat.keySet()) { - radio.addActionListener(listener); - } - rdoCusomAddress.addActionListener(listener); - txtCustomAddress.setEnabled(false); - // Cancel button btnCancel.addActionListener(new ActionListener() { @Override |