refactoring
This commit is contained in:
parent
dcdcdaaa20
commit
015b2df664
@ -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 -> {
|
buttonAddAircraft.addActionListener(e -> {
|
||||||
if (listBoxMaps.getSelectedIndex() == -1)
|
if (listBoxMaps.getSelectedIndex() == -1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user