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())); });