fix final
This commit is contained in:
parent
2d18a7085c
commit
1fb63dffef
@ -9,7 +9,7 @@ public class CreaterGeneric <T extends EntityGasolineTanker, U extends IDrawning
|
|||||||
GasolineTanker=new ArrayList<>(gasolineTankerCount);
|
GasolineTanker=new ArrayList<>(gasolineTankerCount);
|
||||||
Wheels=new ArrayList<>(wheelsCount);
|
Wheels=new ArrayList<>(wheelsCount);
|
||||||
}
|
}
|
||||||
public int AddGasolineTanker(T gasolineTanker){
|
public int Add(T gasolineTanker){
|
||||||
if(GasolineTankerCount<=GasolineTanker.size()){
|
if(GasolineTankerCount<=GasolineTanker.size()){
|
||||||
GasolineTanker.add(gasolineTanker);
|
GasolineTanker.add(gasolineTanker);
|
||||||
GasolineTankerCount++;
|
GasolineTankerCount++;
|
||||||
@ -17,7 +17,7 @@ public class CreaterGeneric <T extends EntityGasolineTanker, U extends IDrawning
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
public int AddWheels(U wheels){
|
public int Add(U wheels){
|
||||||
if(WheelsCount<=Wheels.size()){
|
if(WheelsCount<=Wheels.size()){
|
||||||
Wheels.add(wheels);
|
Wheels.add(wheels);
|
||||||
WheelsCount++;
|
WheelsCount++;
|
||||||
|
@ -71,7 +71,7 @@ public class FormCreater extends JDialog{
|
|||||||
if(fwheels==null)
|
if(fwheels==null)
|
||||||
return;
|
return;
|
||||||
fwheels.SetCountWheels(wheels.getCountWheels());
|
fwheels.SetCountWheels(wheels.getCountWheels());
|
||||||
createrGeneric.AddWheels(fwheels);
|
createrGeneric.Add(fwheels);
|
||||||
});
|
});
|
||||||
|
|
||||||
RedOrnament.addActionListener(e -> {
|
RedOrnament.addActionListener(e -> {
|
||||||
@ -82,7 +82,7 @@ public class FormCreater extends JDialog{
|
|||||||
if(fwheels==null)
|
if(fwheels==null)
|
||||||
return;
|
return;
|
||||||
fwheels.SetCountWheels(wheels.getCountWheels());
|
fwheels.SetCountWheels(wheels.getCountWheels());
|
||||||
createrGeneric.AddWheels(fwheels);
|
createrGeneric.Add(fwheels);
|
||||||
});
|
});
|
||||||
|
|
||||||
GrayOrnament.addActionListener(e -> {
|
GrayOrnament.addActionListener(e -> {
|
||||||
@ -93,7 +93,7 @@ public class FormCreater extends JDialog{
|
|||||||
if(fwheels==null)
|
if(fwheels==null)
|
||||||
return;
|
return;
|
||||||
fwheels.SetCountWheels(wheels.getCountWheels());
|
fwheels.SetCountWheels(wheels.getCountWheels());
|
||||||
createrGeneric.AddWheels(fwheels);
|
createrGeneric.Add(fwheels);
|
||||||
});
|
});
|
||||||
|
|
||||||
BasicRadioButton.addActionListener(e -> {
|
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){
|
if(Integer.parseInt(SpeedTextField.getText())==0 || Integer.parseInt(WeightTextField.getText())==0 || color==null){
|
||||||
return;
|
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 -> {
|
AdvancedRadioButton.addActionListener(e -> {
|
||||||
@ -113,7 +113,7 @@ public class FormCreater extends JDialog{
|
|||||||
if(color2==null){
|
if(color2==null){
|
||||||
return;
|
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()));
|
color1,color2, BodyKitCheckBox.isSelected(),AntennaCheckBox.isSelected()));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user