Compare commits

..

No commits in common. "e07a9cae6948273265bebccd9967098acc4b6b49" and "a180fa3b0a4eee89d8c6970689d6b6be22e26c94" have entirely different histories.

3 changed files with 12 additions and 12 deletions

View File

@ -41,17 +41,17 @@ public class LocomotiveDepotService extends AbstractCompany
@Override
protected void SetObjectsPosition() {
if (locCoord == null || _collection == null) return;
int row = countInRow, col = 1;
for (int i = 0; i < _collection.getCount(); i++, col++) {
if (_collection.get(i) == null) continue;
int row = 1, col = 1;
for (int i = 0; i < _collection.getCount(); i++, col++)
{
if(_collection.get(i) == null) continue;
_collection.get(i).SetPictureSize(_pictureWidth, _pictureHeight);
_collection.get(i).SetPosition(locCoord.get((row - 1) * countInRow + (col - 1)).getKey() + 5, locCoord.get((row - 1) * countInRow + (col - 1)).getValue() + 5);
if (col == countInRow) {
_collection.get(i).SetPosition(locCoord.get(row * countInRow - col).getKey() + 5, locCoord.get(row * countInRow - col).getValue() + 5);
if (col == countInRow)
{
col = 0;
row--;
row++;
}
}
}
}

View File

@ -24,7 +24,7 @@ public class SpecialGenerateLocomotive <T extends EntityLocomotive, U extends ID
public String getEn(int ind) {
if(entityArray.get(ind) instanceof EntityElectricLocomotive) {
EntityElectricLocomotive entity = (EntityElectricLocomotive)entityArray.get(ind);
return "EntityElectricLocomotive{" +
return "EntityWarmlyShip{" +
"speed=" + entity.GetSpeed() +
", weight=" + entity.GetWeight() +
", bodyColor=" + entity.GetBodyColor() +
@ -35,7 +35,7 @@ public class SpecialGenerateLocomotive <T extends EntityLocomotive, U extends ID
'}';
}
else{
return "EntityLocomotive{" +
return "EntityShip{" +
"speed=" + entityArray.get(ind).GetSpeed() +
", weight=" + entityArray.get(ind).GetWeight() +
", bodyColor=" + entityArray.get(ind).GetBodyColor() +

View File

@ -47,8 +47,8 @@ public class FormGenerateLocomotive extends JFrame
sendObject = new JButton("Отправить");
panelLocomotive.setBorder(BorderFactory.createTitledBorder("Объект"));
panelInfoLocomotive.setBorder(BorderFactory.createTitledBorder("Информация о локомотивах"));
panelInfoWheels.setBorder(BorderFactory.createTitledBorder("Информация о колёсах"));
panelInfoLocomotive.setBorder(BorderFactory.createTitledBorder("Информация о кораблях"));
panelInfoWheels.setBorder(BorderFactory.createTitledBorder("Информация о палубах"));
panelButtonManage.setLayout(new GridLayout(1, 2));
labelInfoLocomotive.setVerticalAlignment(SwingConstants.TOP);