mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added new improvements
This commit is contained in:
parent
da2d32d42a
commit
68ba77cdce
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ out.txt
|
|||||||
pocasi.txt
|
pocasi.txt
|
||||||
test.txt
|
test.txt
|
||||||
timecalc.conf
|
timecalc.conf
|
||||||
|
focus.txt
|
||||||
|
@ -1 +1,5 @@
|
|||||||
# Time Calc
|
# Time Calc
|
||||||
|
|
||||||
|
# Hint files
|
||||||
|
|
||||||
|
focus.txt - request focus for the window
|
||||||
|
@ -14,6 +14,7 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.File;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.time.DayOfWeek;
|
import java.time.DayOfWeek;
|
||||||
@ -297,6 +298,8 @@ public class TimeCalcWindow {
|
|||||||
window.add(batteryForMonth);
|
window.add(batteryForMonth);
|
||||||
|
|
||||||
StringBuilder sb = null;
|
StringBuilder sb = null;
|
||||||
|
|
||||||
|
File focusTxt = new File("focus.txt");
|
||||||
while (true) {
|
while (true) {
|
||||||
if (stopBeforeEnd) {
|
if (stopBeforeEnd) {
|
||||||
window.setVisible(false);
|
window.setVisible(false);
|
||||||
@ -304,6 +307,12 @@ public class TimeCalcWindow {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Math.random() > 0.9) {
|
||||||
|
if(focusTxt.exists()) {
|
||||||
|
window.requestFocus();
|
||||||
|
focusTxt.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
if(Utils.highlighted.get()) {
|
if(Utils.highlighted.get()) {
|
||||||
Utils.ultraLight.set(false);
|
Utils.ultraLight.set(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user