From 015b2df6647d99375c26aa50f91092337ed15554 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Tue, 29 Nov 2022 17:03:05 +0300 Subject: [PATCH] refactoring --- FormMapWithSetAircrafts.java | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/FormMapWithSetAircrafts.java b/FormMapWithSetAircrafts.java index 6f5ec15..48d25f3 100644 --- a/FormMapWithSetAircrafts.java +++ b/FormMapWithSetAircrafts.java @@ -108,36 +108,6 @@ public class FormMapWithSetAircrafts implements Form { } }); - /*buttonAddAircraft.addActionListener(e -> { - if (listBoxMaps.getSelectedIndex() == -1) - { - return; - } - - FormAircraft dialog = new FormAircraft(); - dialog.run(); - dialog.setSize(800, 500); - dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - - dialog.setVisible(true); - - if (dialog.getSelectedAircraft() == null) return; - - DrawingObjectAircraft aircraft = new DrawingObjectAircraft(dialog.getSelectedAircraft()); - if (_mapsCollection.getMap(listBoxMaps.getSelectedValue().toString()).addAircraft(aircraft) != -1) - { - JOptionPane.showMessageDialog(jFrame, "Объект добавлен"); - img = _mapsCollection.getMap(listBoxMaps.getSelectedValue().toString()).ShowSet(); - canv.repaint(); - } - else - { - JOptionPane.showMessageDialog(jFrame, "Не удалось добавить объект"); - } - });*/ - - buttonAddAircraft.addActionListener(e -> { if (listBoxMaps.getSelectedIndex() == -1) {