mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
ConfigWindow V
This commit is contained in:
parent
e1dfb42149
commit
f1dadc033f
@ -56,6 +56,7 @@ public class TimeCalcConfiguration {
|
|||||||
visibilityDefaultProperty,
|
visibilityDefaultProperty,
|
||||||
visibilitySupportedColoredProperty,
|
visibilitySupportedColoredProperty,
|
||||||
clockHandsLongVisibleProperty,
|
clockHandsLongVisibleProperty,
|
||||||
|
clockHandsMinuteVisibleProperty,
|
||||||
clockHandsSecondVisibleProperty,
|
clockHandsSecondVisibleProperty,
|
||||||
clockHandsMillisecondVisibleProperty,
|
clockHandsMillisecondVisibleProperty,
|
||||||
batteryWavesVisibleProperty,
|
batteryWavesVisibleProperty,
|
||||||
@ -95,6 +96,10 @@ public class TimeCalcConfiguration {
|
|||||||
throw new TimeCalcException("Unsupported Property class: " + p.getClass().getName());
|
throw new TimeCalcException("Unsupported Property class: " + p.getClass().getName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
for(Property p:allProperties) {
|
||||||
|
System.out.println(p.getName() + "=" + p.getValue());
|
||||||
|
}
|
||||||
|
System.out.println("clockHandsMinuteVisibleProperty=" + clockHandsMinuteVisibleProperty.isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,12 @@ public class TimeCalcKeyAdapter extends KeyAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
System.out.println("Key was pressed: " + e);
|
|
||||||
boolean onlyGreyOrNone =
|
boolean onlyGreyOrNone =
|
||||||
timeCalcConfiguration.visibilitySupportedColoredProperty
|
timeCalcConfiguration.visibilitySupportedColoredProperty
|
||||||
.isEnabled();
|
.isEnabled();
|
||||||
Visibility visibility = Visibility
|
Visibility visibility = Visibility
|
||||||
.valueOf(timeCalcApp.visibilityProperty.getValue());
|
.valueOf(timeCalcApp.visibilityProperty.getValue());
|
||||||
System.out.println("visibility=" + visibility);
|
|
||||||
if (e.getKeyCode() == KeyEvent.VK_UP) {
|
if (e.getKeyCode() == KeyEvent.VK_UP) {
|
||||||
System.out.println("Key UP was pressed: " + e);
|
|
||||||
timeCalcApp.visibilityProperty
|
timeCalcApp.visibilityProperty
|
||||||
.setValue(onlyGreyOrNone ? Visibility.GRAY.name() :
|
.setValue(onlyGreyOrNone ? Visibility.GRAY.name() :
|
||||||
Visibility.STRONGLY_COLORED.name());
|
Visibility.STRONGLY_COLORED.name());
|
||||||
@ -84,7 +81,6 @@ public class TimeCalcKeyAdapter extends KeyAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.getKeyCode() == KeyEvent.VK_V) {
|
if (e.getKeyCode() == KeyEvent.VK_V) {
|
||||||
System.out.println("Key V was pressed: " + e);
|
|
||||||
if (visibility.isNone()) {
|
if (visibility.isNone()) {
|
||||||
timeCalcApp.visibilityProperty
|
timeCalcApp.visibilityProperty
|
||||||
.setValue(onlyGreyOrNone ? Visibility.GRAY.name() :
|
.setValue(onlyGreyOrNone ? Visibility.GRAY.name() :
|
||||||
|
@ -289,27 +289,8 @@ public class MainWindow extends TimeCalcWindow{
|
|||||||
add(monthBattery);
|
add(monthBattery);
|
||||||
|
|
||||||
ComponentRegistry<Component> componentRegistry = new ComponentRegistry();
|
ComponentRegistry<Component> componentRegistry = new ComponentRegistry();
|
||||||
// componentRegistry.addAll(
|
|
||||||
// walkingHumanProgressAsciiArt,
|
|
||||||
// progressSquare,
|
|
||||||
// progressCircle,
|
|
||||||
// analogClock,
|
|
||||||
// dayBattery,
|
|
||||||
// weekBattery,
|
|
||||||
// monthBattery,
|
|
||||||
// hourBattery,
|
|
||||||
// configButton,
|
|
||||||
// workDaysButton,
|
|
||||||
// activitiesButton,
|
|
||||||
// restartButton,
|
|
||||||
// exitButton,
|
|
||||||
// helpButton,
|
|
||||||
// focusButton,
|
|
||||||
// jokeButton,
|
|
||||||
// commandButton
|
|
||||||
// );
|
|
||||||
componentRegistry.addAll(this.getContentPane().getComponents());
|
componentRegistry.addAll(this.getContentPane().getComponents());
|
||||||
componentRegistry.getSet().stream().forEach(c-> System.out.println("Found component: " + c));
|
|
||||||
ComponentRegistry<TimeCalcButton> buttonRegistry = new ComponentRegistry();
|
ComponentRegistry<TimeCalcButton> buttonRegistry = new ComponentRegistry();
|
||||||
componentRegistry.getSet().stream().filter(c-> c instanceof TimeCalcButton).forEach(c->
|
componentRegistry.getSet().stream().filter(c-> c instanceof TimeCalcButton).forEach(c->
|
||||||
buttonRegistry.add((TimeCalcButton)c));
|
buttonRegistry.add((TimeCalcButton)c));
|
||||||
|
@ -14,18 +14,20 @@ notifications.visible=true
|
|||||||
smileys.colored=false
|
smileys.colored=false
|
||||||
|
|
||||||
#todo
|
#todo
|
||||||
visibility.smileys.enabled=true
|
logs.detailed=false
|
||||||
visibility.battery.smileys.enabled=true
|
smileys.visible=true
|
||||||
visibility.progress.square.smileys.enabled=true
|
battery.smileys.visible=true
|
||||||
visibility.progress.circle.smileys.enabled=true
|
square.smileys.visible=true
|
||||||
visibility.battery.charging-unicode-character.enabled=true
|
circle.smileys.visible=true
|
||||||
|
battery.charging-unicode-character.visible=true
|
||||||
battery.percent-precision.count-of-decimal-points=5
|
battery.percent-precision.count-of-decimal-points=5
|
||||||
visibility.battery.label.finished-from-total.enabled=true
|
battery.label.finished-from-total.visible=true
|
||||||
visibility.widgets.clock.enabled=true
|
widgets.clock.visible=true
|
||||||
visibility.widgets.progress-square.enabled=true
|
square.visible=true
|
||||||
visibility.widgets.progress-circle.enabled=true
|
circle.visible=true
|
||||||
visibility.widgets.walking-human.enabled=true
|
walking-human.visible=true
|
||||||
visibility.widgets.battery.hour.enabled=true
|
battery.visible=true
|
||||||
visibility.widgets.battery.day.enabled=true
|
battery.hour.visible=true
|
||||||
visibility.widgets.battery.week.enabled=true
|
battery.day.visible=true
|
||||||
visibility.widgets.battery.month.enabled=true
|
battery.week.visible=true
|
||||||
|
battery.month.visible=true
|
||||||
|
@ -14,18 +14,21 @@ notifications.visible=true
|
|||||||
smileys.colored=false
|
smileys.colored=false
|
||||||
|
|
||||||
#todo
|
#todo
|
||||||
visibility.smileys.enabled=true
|
logs.detailed=false
|
||||||
visibility.battery.smileys.enabled=true
|
smileys.visible=true
|
||||||
visibility.progress.square.smileys.enabled=true
|
battery.smileys.visible=true
|
||||||
visibility.progress.circle.smileys.enabled=true
|
square.smileys.visible=true
|
||||||
visibility.battery.charging-unicode-character.enabled=true
|
circle.smileys.visible=true
|
||||||
|
battery.charging-unicode-character.visible=true
|
||||||
battery.percent-precision.count-of-decimal-points=5
|
battery.percent-precision.count-of-decimal-points=5
|
||||||
visibility.battery.label.finished-from-total.enabled=true
|
battery.label.finished-from-total.visible=true
|
||||||
visibility.widgets.clock.enabled=true
|
widgets.clock.visible=true
|
||||||
visibility.widgets.progress-square.enabled=true
|
square.visible=true
|
||||||
visibility.widgets.progress-circle.enabled=true
|
circle.visible=true
|
||||||
visibility.widgets.walking-human.enabled=true
|
walking-human.visible=true
|
||||||
visibility.widgets.battery.hour.enabled=true
|
battery.visible=true
|
||||||
visibility.widgets.battery.day.enabled=true
|
battery.hour.visible=true
|
||||||
visibility.widgets.battery.week.enabled=true
|
battery.day.visible=true
|
||||||
visibility.widgets.battery.month.enabled=true
|
battery.week.visible=true
|
||||||
|
battery.month.visible=true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user