PIbd-11 Karakozov_AK LabWork03 Hard #3
@ -1,24 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user