Виктория Кудяева 202784cb0a labWork01
2024-06-09 04:11:10 +04:00

25 lines
790 B
Java

import java.awt.*;
public class DrawingCrawlerRollers {
private CrawlerRollersCount rollersCount;
public void setCrawlerRollersCount(int numOfRoller){
for (CrawlerRollersCount numofenum : CrawlerRollersCount.values()){
if (numofenum.getNumOfRollers() == numOfRoller){
rollersCount = numofenum;
return;
}
}
}
public CrawlerRollersCount getCrawlerRollersCount(){
return rollersCount;
}
public void DrawRollers(Graphics g, int x, int y, int width, int height, Color bodyColor){
g.setColor(bodyColor);
g.fillOval(x, y, width, height);
g.setColor(Color.BLACK);
g.drawOval(x, y, width, height);
g.setColor(bodyColor);
}
}