37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
import java.awt.*;
|
|
|
|
public class DrawningIlluminator implements IDrawningIlluminator{
|
|
private IlluminatorCount _Illuminator;
|
|
|
|
@Override
|
|
public void SetIlluminatorCount(int numOfIllum) {
|
|
_Illuminator = IlluminatorCount.GetIlluminatorCount(numOfIllum);
|
|
}
|
|
|
|
@Override
|
|
public void DrawIlluminator(Graphics g, int _startPosX, int _startPosY) {
|
|
Graphics2D g2d = (Graphics2D) g;
|
|
g2d.setColor(Color.BLACK);
|
|
int numOfIlluminator = 0;
|
|
switch (_Illuminator)
|
|
{
|
|
case Ten:
|
|
numOfIlluminator = 10;
|
|
break;
|
|
case Twenty:
|
|
numOfIlluminator = 20;
|
|
break;
|
|
case Thirty:
|
|
numOfIlluminator = 30;
|
|
break;
|
|
}
|
|
|
|
for(int i = numOfIlluminator; i >= 1; --i){
|
|
g2d.setColor(Color.CYAN);
|
|
g2d.fillOval(_startPosX + 105 - 3 * i, _startPosY + 35, 3, 3);
|
|
g2d.setColor(Color.BLACK);
|
|
g2d.drawOval(_startPosX + 105 - 3 * i, _startPosY + 35, 3, 3);
|
|
}
|
|
}
|
|
}
|