25 lines
717 B
Java
25 lines
717 B
Java
|
import java.awt.*;
|
||
|
|
||
|
public class DrawingRollers {
|
||
|
private RollersCount rollersCount;
|
||
|
public void setRollersCount(int numOfRoller){
|
||
|
for (RollersCount numofenum : RollersCount.values()){
|
||
|
if (numofenum.getNumOfRollers() == numOfRoller){
|
||
|
rollersCount = numofenum;
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public RollersCount getRollersCount(){
|
||
|
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);
|
||
|
}
|
||
|
}
|