Added ProgressRotation II

This commit is contained in:
Robert Vokac 2024-04-18 17:32:42 +02:00
parent e74f63b6b5
commit 39ee336b4e
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
6 changed files with 27 additions and 5 deletions

View File

@ -199,6 +199,12 @@ public class TimeCalcConfiguration {
= new StringProperty(TimeCalcProperty.FUEL_TYPE.getKey()); = new StringProperty(TimeCalcProperty.FUEL_TYPE.getKey());
public final BooleanProperty fuelIconVisibleProperty public final BooleanProperty fuelIconVisibleProperty
= new BooleanProperty(TimeCalcProperty.FUEL_ICON_VISIBLE.getKey()); = new BooleanProperty(TimeCalcProperty.FUEL_ICON_VISIBLE.getKey());
public final BooleanProperty rotationVisibleProperty
= new BooleanProperty(TimeCalcProperty.ROTATION_VISIBLE.getKey());
public final BooleanProperty rotationHiddenProperty
= new BooleanProperty(TimeCalcProperty.ROTATION_HIDDEN.getKey());
public final StringProperty rotationTypeProperty
= new StringProperty(TimeCalcProperty.ROTATION_TYPE.getKey());
public final BooleanProperty circleVisibleProperty public final BooleanProperty circleVisibleProperty
= new BooleanProperty(TimeCalcProperty.CIRCLE_VISIBLE.getKey()); = new BooleanProperty(TimeCalcProperty.CIRCLE_VISIBLE.getKey());
public final BooleanProperty circleHiddenProperty public final BooleanProperty circleHiddenProperty
@ -333,6 +339,7 @@ public class TimeCalcConfiguration {
dotVisibleProperty,dotTypeProperty, dotVisibleProperty,dotTypeProperty,
fuelVisibleProperty, fuelTypeProperty, fuelHiddenProperty, fuelVisibleProperty, fuelTypeProperty, fuelHiddenProperty,
fuelIconVisibleProperty, fuelIconVisibleProperty,
rotationVisibleProperty, rotationTypeProperty, rotationHiddenProperty,
swingVisibleProperty, swingVisibleProperty,
swingTypeProperty, swingTypeProperty,
swingQuarterIconVisibleProperty, swingQuarterIconVisibleProperty,

View File

@ -95,6 +95,9 @@ public enum TimeCalcProperty {
FUEL_VISIBLE("fuel.visible", "Fuel"), FUEL_VISIBLE("fuel.visible", "Fuel"),
FUEL_TYPE("fuel.type", "Fuel : Type"), FUEL_TYPE("fuel.type", "Fuel : Type"),
FUEL_HIDDEN("fuel.hidden", "Fuel : Hidden"), FUEL_HIDDEN("fuel.hidden", "Fuel : Hidden"),
ROTATION_VISIBLE("rotation.visible", "Rotation"),
ROTATION_TYPE("rotation.type", "Rotation : Type"),
ROTATION_HIDDEN("rotation.hidden", "Rotation : Hidden"),
FUEL_ICON_VISIBLE("fuel.icon.visible", "Fuel : Icon"), FUEL_ICON_VISIBLE("fuel.icon.visible", "Fuel : Icon"),
CIRCLE_VISIBLE("circle.visible", "Circle"), CIRCLE_VISIBLE("circle.visible", "Circle"),
CIRCLE_TYPE("circle.type", "Circle : Type"), CIRCLE_TYPE("circle.type", "Circle : Type"),

View File

@ -113,7 +113,7 @@ public class ProgressRotation extends Widget {
// //
angle = angle + 0.001d * donePercent() * 50d; angle = angle + 0.001d * donePercent() * 50d;
if(angle > 1.0d) { if(angle > 1.0d) {
angle = 0.0d; angle = angle - 1.0d;
} }
drawHand(brush, side / 2 - 10, angle, 1.0f, drawHand(brush, side / 2 - 10, angle, 1.0f,

View File

@ -244,6 +244,13 @@ public class ConfigWindow extends TWindow {
private final JCheckBox fuelIconVisibleProperty private final JCheckBox fuelIconVisibleProperty
= new JCheckBox(TimeCalcProperty.FUEL_ICON_VISIBLE.getKey()); = new JCheckBox(TimeCalcProperty.FUEL_ICON_VISIBLE.getKey());
// //
private final JCheckBox rotationVisibleProperty
= new JCheckBox(TimeCalcProperty.ROTATION_VISIBLE.getKey());
private final JTextField rotationTypeProperty =
new JTextField(TimeCalcProperty.ROTATION_TYPE.getKey());
private final JCheckBox rotationHiddenProperty
= new JCheckBox(TimeCalcProperty.ROTATION_HIDDEN.getKey());
//
public final JCheckBox clockHiddenProperty public final JCheckBox clockHiddenProperty
= new JCheckBox(TimeCalcProperty.CLOCK_HIDDEN.getKey()); = new JCheckBox(TimeCalcProperty.CLOCK_HIDDEN.getKey());
public final JCheckBox batteryMinuteHiddenProperty public final JCheckBox batteryMinuteHiddenProperty
@ -467,6 +474,7 @@ public class ConfigWindow extends TWindow {
walkingHumanVisibleProperty.setSelected(enable); walkingHumanVisibleProperty.setSelected(enable);
fuelVisibleProperty.setSelected(enable); fuelVisibleProperty.setSelected(enable);
fuelIconVisibleProperty.setSelected(enable); fuelIconVisibleProperty.setSelected(enable);
rotationVisibleProperty.setSelected(enable);
typeVisibleProperty.setSelected(enable); typeVisibleProperty.setSelected(enable);
// clockHiddenProperty.setSelected(!enable); // clockHiddenProperty.setSelected(!enable);
// batteryMinuteHiddenProperty.setSelected(!enable); // batteryMinuteHiddenProperty.setSelected(!enable);
@ -554,6 +562,7 @@ public class ConfigWindow extends TWindow {
circleVisibleProperty,circleHiddenProperty,circleTypeProperty, circleVisibleProperty,circleHiddenProperty,circleTypeProperty,
dotVisibleProperty,dotHiddenProperty,dotTypeProperty, dotVisibleProperty,dotHiddenProperty,dotTypeProperty,
fuelVisibleProperty,fuelTypeProperty,fuelHiddenProperty,fuelIconVisibleProperty, fuelVisibleProperty,fuelTypeProperty,fuelHiddenProperty,fuelIconVisibleProperty,
rotationVisibleProperty, rotationTypeProperty, rotationHiddenProperty,
swingVisibleProperty,swingHiddenProperty,swingTypeProperty,swingQuarterIconVisibleProperty, swingVisibleProperty,swingHiddenProperty,swingTypeProperty,swingQuarterIconVisibleProperty,
walkingHumanVisibleProperty,walkingHumanHiddenProperty,walkingHumanTypeProperty, walkingHumanVisibleProperty,walkingHumanHiddenProperty,walkingHumanTypeProperty,
lifeVisibleProperty,lifeHiddenProperty,lifeTypeProperty,lifeBirthDateProperty, lifeVisibleProperty,lifeHiddenProperty,lifeTypeProperty,lifeBirthDateProperty,
@ -970,7 +979,7 @@ public class ConfigWindow extends TWindow {
index = 5; index = 5;
} }
if (key.startsWith("square.")||key.startsWith("circle.")||key.startsWith("dot.")||key.startsWith("swing.")||key.startsWith("walking-human.") || key.startsWith("fuel.")) { if (key.startsWith("square.")||key.startsWith("circle.")||key.startsWith("dot.")||key.startsWith("swing.")||key.startsWith("walking-human.") || key.startsWith("fuel.") || key.startsWith("rotation.")) {
index = 6; index = 6;
} }

View File

@ -443,11 +443,11 @@ public class MainWindow extends TWindow {
100, 100); 100, 100);
progressRotation.visibleProperty progressRotation.visibleProperty
.bindTo(timeCalcConfiguration.fuelVisibleProperty); .bindTo(timeCalcConfiguration.rotationVisibleProperty);
progressRotation.typeProperty progressRotation.typeProperty
.bindTo(timeCalcConfiguration.fuelTypeProperty); .bindTo(timeCalcConfiguration.rotationTypeProperty);
progressRotation.hiddenProperty progressRotation.hiddenProperty
.bindTo(timeCalcConfiguration.fuelHiddenProperty); .bindTo(timeCalcConfiguration.rotationHiddenProperty);
add(progressRotation); add(progressRotation);
// //

View File

@ -65,6 +65,9 @@ fuel.visible=true
fuel.type=day fuel.type=day
fuel.hidden=false fuel.hidden=false
fuel.icon.visible=true fuel.icon.visible=true
rotation.visible=true
rotation.type=day
rotation.hidden=false
swing.visible=true swing.visible=true
swing.type=day swing.type=day
swing.hidden=false swing.hidden=false