This commit is contained in:
gac-S_Changer
2019-02-05 15:54:50 +01:00
parent 872eb21eb4
commit 3359ffce53
4 changed files with 70 additions and 9 deletions

View File

@@ -101,6 +101,9 @@ public class PuckGraphics {
Color getColor() {
Color ret = Color.LIGHT_GRAY;
if (puck.isDisabled()){
return basePlateGraphics.getColor();
}
switch (puck.detection) {
case Empty:
//ret = isHighlithted() ? new Color(224, 224, 224) : Color.LIGHT_GRAY;
@@ -177,6 +180,9 @@ public class PuckGraphics {
}
Color getLabelColor(boolean drawBackground) {
if (puck.isDisabled()){
return Color.RED;
}
return drawBackground ? (isHighlithted() ? Color.BLACK : new Color(92, 92, 92)) : (isHighlithted() ? new Color(0, 255, 0) : new Color(0, 162, 0));
}
@@ -203,6 +209,9 @@ public class PuckGraphics {
Color getBorderColor(boolean drawBackground) {
if (drawBackground) {
if (puck.isDisabled()){
return Color.RED;
}
/*if (!isEnabled()){
return Color.GRAY;
} else */
@@ -231,6 +240,9 @@ public class PuckGraphics {
void draw(Graphics2D g, Rectangle plotRect, boolean drawSamples, boolean drawId, boolean drawBackground) {
this.plotRect = plotRect;
if (puck.isDisabled()){
drawSamples=false;
}
Point position = getDrawPosition();
int size = getDrawSize();
if (drawBackground) {