MainPanel prototype

This commit is contained in:
gac-S_Changer
2018-04-10 09:50:23 +02:00
parent fd15d2cf48
commit 1e2fee44d0
7 changed files with 75 additions and 37 deletions

View File

@@ -149,9 +149,12 @@ public class BasePlate extends DeviceBase {
return plotRect;
}
Color getBorderColor() {
Color getBorderColor(boolean drawBackground) {
//return new Color(32,32,32);
return MainFrame.isDark() ? new Color(32,32,32) : Color.DARK_GRAY;
if (drawBackground){
return MainFrame.isDark() ? new Color(32,32,32) : Color.DARK_GRAY;
}
return MainFrame.isDark() ? new Color(0,32,0) : new Color(0,64,0);
}
Color getColor() {
@@ -204,7 +207,7 @@ public class BasePlate extends DeviceBase {
g.setColor(getColor());
g.fillOval(boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height);
}
g.setColor(getBorderColor());
g.setColor(getBorderColor(drawBackground));
g.drawOval(boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height);
}