diff --git a/Tank/src/DrawingArmoVehicle.java b/Tank/src/DrawingArmoVehicle.java index d918ec1..96b27d0 100644 --- a/Tank/src/DrawingArmoVehicle.java +++ b/Tank/src/DrawingArmoVehicle.java @@ -37,7 +37,7 @@ public class DrawingArmoVehicle { OrnamentsForm.setDigit(_numWheel); } - public DrawingArmoVehicle(EntityArmoVehicle vehicle, IOrnamentForm ornamentsForm, int width, int height) { + protected DrawingArmoVehicle(EntityArmoVehicle vehicle, IOrnamentForm ornamentsForm, int width, int height) { if (height < _pictureHeight || width < _pictureWidth) return; _pictureWidth = width; diff --git a/Tank/src/FormTankCollection.java b/Tank/src/FormTankCollection.java index 384f7a3..85fb4b1 100644 --- a/Tank/src/FormTankCollection.java +++ b/Tank/src/FormTankCollection.java @@ -3,9 +3,8 @@ import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - public class FormTankCollection { - private class Canvas extends JComponent{ + private class Canvas extends JComponent { public TanksGenericCollections _tank; public Canvas() { } @@ -42,8 +41,7 @@ public class FormTankCollection { if (_tank.Add(form._drawingTank) != -1) { JOptionPane.showMessageDialog(null, "Объект добавлен", "Информация", JOptionPane.INFORMATION_MESSAGE); Draw(); - } - else { + } else { JOptionPane.showMessageDialog(null, "Не удалось добавить объект", "Информация", JOptionPane.INFORMATION_MESSAGE); } form.Frame.dispose(); @@ -76,8 +74,7 @@ public class FormTankCollection { if (_tank.remove(pos) != null) { JOptionPane.showMessageDialog(null, "Объект удален", "Информация", JOptionPane.INFORMATION_MESSAGE); Draw(); - } - else { + } else { JOptionPane.showMessageDialog(null, "Не удалось удалить объект", "Информация", JOptionPane.INFORMATION_MESSAGE); } } @@ -96,7 +93,7 @@ public class FormTankCollection { JButton toFormTankGenerate = new JButton("Генерировать технику"); toFormTankGenerate.addActionListener( new ActionListener() { - public void actionPerformed(ActionEvent e){ + public void actionPerformed(ActionEvent e) { FormTankGenerate formTankGenerate = new FormTankGenerate(); } }