Готовая лабораторная работа 3
This commit is contained in:
parent
4fa99338a4
commit
3707bb2cab
@ -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;
|
||||
|
@ -3,7 +3,6 @@ import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
|
||||
public class FormTankCollection {
|
||||
private class Canvas extends JComponent {
|
||||
public TanksGenericCollections<DrawingArmoVehicle, DrawingObjectTank> _tank;
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user