Fixes
This commit is contained in:
parent
e60990067a
commit
5c582f70b3
@ -155,15 +155,12 @@ public class FormMapWithSetArtilleries extends JFrame {
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttonShowDeleted.addActionListener(e -> {
|
buttonShowDeleted.addActionListener(e -> {
|
||||||
if (!deletedObjects.empty()) {
|
FormArtillery dialog = new FormArtillery(deletedObjects.empty() ? null : ((DrawingObjectArtillery)deletedObjects.pop()).getArtillery());
|
||||||
DrawingObjectArtillery deleted = (DrawingObjectArtillery) deletedObjects.pop();
|
dialog.setSize(800, 500);
|
||||||
FormArtillery dialog = new FormArtillery(deleted == null ? null : deleted.getArtillery());
|
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
||||||
dialog.setSize(800, 500);
|
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||||
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
|
||||||
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
||||||
|
|
||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonLeft.addActionListener(e -> {
|
buttonLeft.addActionListener(e -> {
|
||||||
|
@ -7,7 +7,7 @@ public class MapWithSetArtilleriesGeneric<T extends IDrawingObject, U extends Ab
|
|||||||
public final int _pictureHeight;
|
public final int _pictureHeight;
|
||||||
public final int _placeSizeWidth = 210;
|
public final int _placeSizeWidth = 210;
|
||||||
public final int _placeSizeHeight = 90;
|
public final int _placeSizeHeight = 90;
|
||||||
private final SetArtilleriesGeneric<T> _setArtilleries;
|
public final SetArtilleriesGeneric<T> _setArtilleries;
|
||||||
private final U _map;
|
private final U _map;
|
||||||
|
|
||||||
public MapWithSetArtilleriesGeneric(int picWidth, int picHeight, U map) {
|
public MapWithSetArtilleriesGeneric(int picWidth, int picHeight, U map) {
|
||||||
|
@ -30,4 +30,12 @@ public class MapsCollection {
|
|||||||
public MapWithSetArtilleriesGeneric<IDrawingObject, AbstractMap> getMap(String name) {
|
public MapWithSetArtilleriesGeneric<IDrawingObject, AbstractMap> getMap(String name) {
|
||||||
return _mapsStorage.getOrDefault(name, null);
|
return _mapsStorage.getOrDefault(name, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IDrawingObject getArtillery(String mapName, int index) {
|
||||||
|
var map = _mapsStorage.getOrDefault(mapName, null);
|
||||||
|
if (map != null) {
|
||||||
|
return map._setArtilleries.get(index);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user