Added several improvements XXXVI
This commit is contained in:
parent
54cdb97757
commit
0d3f06854c
@ -17,8 +17,13 @@ public class ProgressSquare extends JPanel {
|
||||
private int side = 0;
|
||||
private int square;
|
||||
private double donePercent = 0;
|
||||
|
||||
private boolean highlight = false;
|
||||
|
||||
public void setHighlight(boolean highlight) {
|
||||
this.highlight = highlight;
|
||||
}
|
||||
|
||||
public ProgressSquare() {
|
||||
setPreferredSize(new Dimension(400, 400));
|
||||
setBackground(BACKGROUND_COLOR);
|
||||
@ -57,10 +62,6 @@ public class ProgressSquare extends JPanel {
|
||||
|
||||
@Override
|
||||
public void paintComponent(Graphics g) {
|
||||
|
||||
if(donePercent >= 0.99) {
|
||||
highlight = true;
|
||||
}
|
||||
if (side == 0) {
|
||||
this.side = Math.min(getWidth(), getHeight());
|
||||
this.square = side * side;
|
||||
|
@ -188,6 +188,7 @@ public class TimeCalcWindow {
|
||||
}
|
||||
if (hourRemains == 0 && minuteRemains <= 3) {
|
||||
analogClock.setHighlight(true);
|
||||
progressSquare.setHighlight(true);
|
||||
text.setForeground(Color.BLUE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user