Minhasapov R.H. LabWork04 #4

Closed
safgerd wants to merge 3 commits from LabWork04 into LabWork03
2 changed files with 8 additions and 8 deletions
Showing only changes of commit 44da4da1bf - Show all commits

View File

@ -16,21 +16,21 @@ public class EntityWithRollers<T extends EntityTracktor, U extends IDrawningRoll
public boolean add(T entity) {
if (entitiesCount >= entities.length) {
return false;
}
return false;
}
entities[entitiesCount++] = entity;
return true;
}
public boolean add(U roller) {
if (rollersCount >= rollers.length) {
return false;
}
return false;
}
rollers[rollersCount++] = roller;
return true;
}
public IDrawningObject constructArtillery() {
public IDrawningObject constructTracktor() {
if (entitiesCount == 0 || rollersCount == 0) {
return null;
}

View File

@ -40,9 +40,9 @@ public class FormGallery extends JFrame {
}
buttonRefresh.addActionListener(e -> {
first = storage.constructArtillery();
second = storage.constructArtillery();
third = storage.constructArtillery();
first = storage.constructTracktor();
second = storage.constructTracktor();
third = storage.constructTracktor();
first.setObject(0, 10, pictureBox.getWidth(), pictureBox.getHeight());
second.setObject(150, 10, pictureBox.getWidth(), pictureBox.getHeight());