Mochalov D.V. Hard LabWork04 #4

Closed
b0n3l3sS wants to merge 6 commits from LabWork04 into LabWork03
2 changed files with 4 additions and 1 deletions
Showing only changes of commit dbfe33b361 - Show all commits

View File

@ -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);

View File

@ -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;
}
/// Вывод всего набора объектов