2023-10-09 22:31:20 +04:00
|
|
|
package ProjectStormtrooper;
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class DrawingEnginesEllipse implements IDrawingEngines {
|
|
|
|
private EnumEnginesCount _enumEnginesCount;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void SetEnumEnginesCount(int enginesCount) {
|
|
|
|
for (EnumEnginesCount val : EnumEnginesCount.values()) {
|
|
|
|
if (val.count == enginesCount) {
|
|
|
|
this._enumEnginesCount = val;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this._enumEnginesCount = EnumEnginesCount.Two;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public EnumEnginesCount GetEnumEnginesCount() {
|
|
|
|
return _enumEnginesCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void DrawEngine(Graphics2D g2d, Color color, int x, int y, int w, int h) {
|
|
|
|
g2d.setColor(Color.WHITE);
|
2023-10-10 12:26:20 +04:00
|
|
|
g2d.fillOval(x, y, w, h);
|
2023-10-09 22:31:20 +04:00
|
|
|
g2d.setColor(Color.BLACK);
|
2023-10-10 12:26:20 +04:00
|
|
|
g2d.drawOval(x, y, w, h);
|
2023-10-09 22:31:20 +04:00
|
|
|
}
|
|
|
|
}
|