PIbd-21 Belianin N.N. LabWork03 Hard #4

Closed
Belnik wants to merge 21 commits from LabWork03 into LabWork02
2 changed files with 5 additions and 8 deletions
Showing only changes of commit 3707bb2cab - Show all commits

View File

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

View File

@ -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<DrawingArmoVehicle, DrawingObjectTank> _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();
}
}