Mochalov D.V. Hard LabWork04 #4
@ -293,6 +293,9 @@ public class FormMapWithSetLocomotives extends JComponent {
|
||||
//первой лабораторной), передавая туда элемент из коллекции
|
||||
//удаленных, если там есть
|
||||
DrawningObjectLocomotive locomotive = _mapsCollection.Get(listBoxMaps.getSelectedValue().toString()).getDeleted();
|
||||
if (locomotive == null) {
|
||||
JOptionPane.showMessageDialog(null, "No deleted objects");
|
||||
}
|
||||
if (locomotive != null) {
|
||||
JDialog dialog = new JDialog(formFrame, "Deleted", true);
|
||||
FormLocomotive formLocomotive = new FormLocomotive(dialog);
|
||||
|
@ -48,7 +48,7 @@ public class MapWithSetLocomotivesGeneric
|
||||
{
|
||||
T temp = this._setLocomotives.Remove(position);
|
||||
if (temp == null) return null;
|
||||
if (temp instanceof DrawningObjectLocomotive) deletedLocomotives.add((DrawningObjectLocomotive) temp);
|
||||
deletedLocomotives.add((DrawningObjectLocomotive) temp);
|
||||
return temp;
|
||||
}
|
||||
/// Вывод всего набора объектов
|
||||
|
Loading…
Reference in New Issue
Block a user