fix final

This commit is contained in:
Кашин Максим 2022-11-16 10:38:18 +04:00
parent 2d18a7085c
commit 1fb63dffef
2 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ public class CreaterGeneric <T extends EntityGasolineTanker, U extends IDrawning
GasolineTanker=new ArrayList<>(gasolineTankerCount);
Wheels=new ArrayList<>(wheelsCount);
}
public int AddGasolineTanker(T gasolineTanker){
public int Add(T gasolineTanker){
if(GasolineTankerCount<=GasolineTanker.size()){
GasolineTanker.add(gasolineTanker);
GasolineTankerCount++;
@ -17,7 +17,7 @@ public class CreaterGeneric <T extends EntityGasolineTanker, U extends IDrawning
}
return -1;
}
public int AddWheels(U wheels){
public int Add(U wheels){
if(WheelsCount<=Wheels.size()){
Wheels.add(wheels);
WheelsCount++;

View File

@ -71,7 +71,7 @@ public class FormCreater extends JDialog{
if(fwheels==null)
return;
fwheels.SetCountWheels(wheels.getCountWheels());
createrGeneric.AddWheels(fwheels);
createrGeneric.Add(fwheels);
});
RedOrnament.addActionListener(e -> {
@ -82,7 +82,7 @@ public class FormCreater extends JDialog{
if(fwheels==null)
return;
fwheels.SetCountWheels(wheels.getCountWheels());
createrGeneric.AddWheels(fwheels);
createrGeneric.Add(fwheels);
});
GrayOrnament.addActionListener(e -> {
@ -93,7 +93,7 @@ public class FormCreater extends JDialog{
if(fwheels==null)
return;
fwheels.SetCountWheels(wheels.getCountWheels());
createrGeneric.AddWheels(fwheels);
createrGeneric.Add(fwheels);
});
BasicRadioButton.addActionListener(e -> {
@ -101,7 +101,7 @@ public class FormCreater extends JDialog{
if(Integer.parseInt(SpeedTextField.getText())==0 || Integer.parseInt(WeightTextField.getText())==0 || color==null){
return;
}
createrGeneric.AddGasolineTanker(new EntityGasolineTanker(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color));
createrGeneric.Add(new EntityGasolineTanker(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color));
});
AdvancedRadioButton.addActionListener(e -> {
@ -113,7 +113,7 @@ public class FormCreater extends JDialog{
if(color2==null){
return;
}
createrGeneric.AddGasolineTanker(new EntityImprovedGasolineTanker(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),
createrGeneric.Add(new EntityImprovedGasolineTanker(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),
color1,color2, BodyKitCheckBox.isSelected(),AntennaCheckBox.isSelected()));
});