mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added some improvements
This commit is contained in:
parent
9afa86c0d9
commit
f28759ffd1
@ -121,6 +121,8 @@ public class MainWindow extends TWindow {
|
|||||||
private int speed = Integer.MIN_VALUE;
|
private int speed = Integer.MIN_VALUE;
|
||||||
private final TimeCalcKeyAdapter timeCalcKeyAdapter;
|
private final TimeCalcKeyAdapter timeCalcKeyAdapter;
|
||||||
private double msRemaining = 0d;
|
private double msRemaining = 0d;
|
||||||
|
private final Time timeAlwaysReal;
|
||||||
|
private boolean floatingTime = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
ChangeListener valueMustBeTime
|
ChangeListener valueMustBeTime
|
||||||
@ -155,6 +157,7 @@ public class MainWindow extends TWindow {
|
|||||||
setTitle(getWindowTitle());
|
setTitle(getWindowTitle());
|
||||||
});
|
});
|
||||||
Time time = new Time();
|
Time time = new Time();
|
||||||
|
this.timeAlwaysReal = new Time();
|
||||||
time.yearCustomProperty
|
time.yearCustomProperty
|
||||||
.bindTo(timeCalcConfiguration.testYearCustomProperty);
|
.bindTo(timeCalcConfiguration.testYearCustomProperty);
|
||||||
time.monthCustomProperty
|
time.monthCustomProperty
|
||||||
@ -845,10 +848,10 @@ public class MainWindow extends TWindow {
|
|||||||
workingDayRepository.update(wd);
|
workingDayRepository.update(wd);
|
||||||
|
|
||||||
new Timer(100, e -> {
|
new Timer(100, e -> {
|
||||||
// if (speed == Integer.MIN_VALUE) {
|
if (speed == Integer.MIN_VALUE) {
|
||||||
// timeCalcConfiguration.testEnabledProperty.setValue(false);
|
//timeCalcConfiguration.testEnabledProperty.setValue(false);
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
double r = Math.pow(2, speed + 6);
|
double r = Math.pow(2, speed + 6);
|
||||||
if (speed < -6 && Math.random() > r) {
|
if (speed < -6 && Math.random() > r) {
|
||||||
// System.out.println(NumberFormats.FORMATTER_EIGHT_DECIMAL_PLACES.format(r));
|
// System.out.println(NumberFormats.FORMATTER_EIGHT_DECIMAL_PLACES.format(r));
|
||||||
@ -1351,4 +1354,10 @@ public class MainWindow extends TWindow {
|
|||||||
this.speed = Integer.MIN_VALUE;
|
this.speed = Integer.MIN_VALUE;
|
||||||
timeCalcConfiguration.speedProperty.setValue(this.speed);
|
timeCalcConfiguration.speedProperty.setValue(this.speed);
|
||||||
}
|
}
|
||||||
|
public void enableFloatingTime() {
|
||||||
|
this.floatingTime = true;
|
||||||
|
}
|
||||||
|
public void disableFloatingTieme() {
|
||||||
|
this.floatingTime = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user