25 lines
790 B
Java
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);
|
|
}
|
|
}
|