From 1fb63dffef921e623d5fd4689de50058623314c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D1=88=D0=B8=D0=BD=20=D0=9C=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D0=BC?= Date: Wed, 16 Nov 2022 10:38:18 +0400 Subject: [PATCH] fix final --- src/CreaterGeneric.java | 4 ++-- src/FormCreater.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CreaterGeneric.java b/src/CreaterGeneric.java index 0e56006..5b45c14 100644 --- a/src/CreaterGeneric.java +++ b/src/CreaterGeneric.java @@ -9,7 +9,7 @@ public class CreaterGeneric (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 { @@ -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())); });