Корректировки
This commit is contained in:
parent
b9677dd6e4
commit
d16a35a31c
@ -10,7 +10,7 @@ public class CreaterGeneric<T extends EntityWarship, U extends IDrawingObjectBlo
|
||||
Warships=new ArrayList<>(warshipsCount);
|
||||
Blocks=new ArrayList<>(blocksCount);
|
||||
}
|
||||
public int AddWarship(T warship){
|
||||
public int Add(T warship){
|
||||
if(WarshipsCount<=Warships.size()){
|
||||
Warships.add(warship);
|
||||
WarshipsCount++;
|
||||
@ -18,7 +18,7 @@ public class CreaterGeneric<T extends EntityWarship, U extends IDrawingObjectBlo
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public int AddBlock(U block){
|
||||
public int Add(U block){
|
||||
if(BlocksCount<=Blocks.size()){
|
||||
Blocks.add(block);
|
||||
BlocksCount++;
|
||||
|
@ -69,7 +69,7 @@ public class FormCreater extends JDialog{
|
||||
if(fblock==null)
|
||||
return;
|
||||
fblock.SetBlockCount(block.GetBlockCount());
|
||||
createrGeneric.AddBlock(fblock);
|
||||
createrGeneric.Add(fblock);
|
||||
});
|
||||
|
||||
RoundFormRadioButton.addActionListener(e -> {
|
||||
@ -80,7 +80,7 @@ public class FormCreater extends JDialog{
|
||||
if(fblock==null)
|
||||
return;
|
||||
fblock.SetBlockCount(block.GetBlockCount());
|
||||
createrGeneric.AddBlock(fblock);
|
||||
createrGeneric.Add(fblock);
|
||||
});
|
||||
|
||||
TriangleFormRadioButton.addActionListener(e -> {
|
||||
@ -91,7 +91,7 @@ public class FormCreater extends JDialog{
|
||||
if(fblock==null)
|
||||
return;
|
||||
fblock.SetBlockCount(block.GetBlockCount());
|
||||
createrGeneric.AddBlock(fblock);
|
||||
createrGeneric.Add(fblock);
|
||||
});
|
||||
|
||||
BasicRadioButton.addActionListener(e -> {
|
||||
@ -99,7 +99,7 @@ public class FormCreater extends JDialog{
|
||||
if(Integer.parseInt(SpeedTextField.getText())==0 || Integer.parseInt(WeightTextField.getText())==0 || color==null){
|
||||
return;
|
||||
}
|
||||
createrGeneric.AddWarship(new EntityWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color));
|
||||
createrGeneric.Add(new EntityWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color));
|
||||
});
|
||||
|
||||
AdvancedRadioButton.addActionListener(e -> {
|
||||
@ -111,7 +111,7 @@ public class FormCreater extends JDialog{
|
||||
if(color2==null){
|
||||
return;
|
||||
}
|
||||
createrGeneric.AddWarship(new EntityAdvancedWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),
|
||||
createrGeneric.Add(new EntityAdvancedWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),
|
||||
color1,color2,HelipadCheckBox.isSelected(),AntennaCheckBox.isSelected(),MissileCheckBox.isSelected()));
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user