mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added circle progress for analog clock
This commit is contained in:
parent
604d2384cf
commit
763f2ee903
@ -86,6 +86,10 @@ public class TimeCalcConfiguration {
|
|||||||
= new BooleanProperty(
|
= new BooleanProperty(
|
||||||
TimeCalcProperty.CLOCK_PERCENT_PROGRESS_VISIBLE
|
TimeCalcProperty.CLOCK_PERCENT_PROGRESS_VISIBLE
|
||||||
.getKey());
|
.getKey());
|
||||||
|
public final BooleanProperty clockCircleProgressVisibleProperty
|
||||||
|
= new BooleanProperty(
|
||||||
|
TimeCalcProperty.CLOCK_CIRCLE_PROGRESS_VISIBLE
|
||||||
|
.getKey());
|
||||||
//
|
//
|
||||||
public final BooleanProperty batteryWavesVisibleProperty
|
public final BooleanProperty batteryWavesVisibleProperty
|
||||||
= new BooleanProperty(TimeCalcProperty.BATTERY_WAVES_VISIBLE
|
= new BooleanProperty(TimeCalcProperty.BATTERY_WAVES_VISIBLE
|
||||||
@ -243,6 +247,7 @@ public class TimeCalcConfiguration {
|
|||||||
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
||||||
clockSmileyVisibleProperty,
|
clockSmileyVisibleProperty,
|
||||||
clockPercentProgressVisibleProperty,
|
clockPercentProgressVisibleProperty,
|
||||||
|
clockCircleProgressVisibleProperty,
|
||||||
batteryWavesVisibleProperty,
|
batteryWavesVisibleProperty,
|
||||||
batteryCircleProgressProperty,
|
batteryCircleProgressProperty,
|
||||||
batteryPercentProgressProperty,
|
batteryPercentProgressProperty,
|
||||||
|
@ -51,6 +51,7 @@ public enum TimeCalcProperty {
|
|||||||
"Clock : Date visible only, if mouse moving over"),
|
"Clock : Date visible only, if mouse moving over"),
|
||||||
CLOCK_SMILEY_VISIBLE("clock.smiley.visible","Clock : Smiley : Visible"),
|
CLOCK_SMILEY_VISIBLE("clock.smiley.visible","Clock : Smiley : Visible"),
|
||||||
CLOCK_PERCENT_PROGRESS_VISIBLE("clock.percent-progress.visible","Clock : Percent progress : Visible"),
|
CLOCK_PERCENT_PROGRESS_VISIBLE("clock.percent-progress.visible","Clock : Percent progress : Visible"),
|
||||||
|
CLOCK_CIRCLE_PROGRESS_VISIBLE("clock.circle-progress.visible", "Clock : Circle Progress"),
|
||||||
//
|
//
|
||||||
BATTERY_WAVES_VISIBLE("battery.waves.visible", "Battery : Waves"),
|
BATTERY_WAVES_VISIBLE("battery.waves.visible", "Battery : Waves"),
|
||||||
BATTERY_CIRCLE_PROGRESS_VISIBLE("battery.circle-progress.visible",
|
BATTERY_CIRCLE_PROGRESS_VISIBLE("battery.circle-progress.visible",
|
||||||
|
@ -32,6 +32,10 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javax.swing.JMenuItem;
|
import javax.swing.JMenuItem;
|
||||||
|
import static org.nanoboot.utils.timecalc.swing.progress.Battery.HIGH_STRONGLY_COLORED;
|
||||||
|
import static org.nanoboot.utils.timecalc.swing.progress.Battery.HIGH_WEAKLY_COLORED;
|
||||||
|
import static org.nanoboot.utils.timecalc.swing.progress.Battery.LIGHT_RED;
|
||||||
|
import static org.nanoboot.utils.timecalc.swing.progress.Battery.ULTRA_LIGHT_RED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert Vokac
|
* @author Robert Vokac
|
||||||
@ -534,6 +538,29 @@ public class Widget extends JPanel implements
|
|||||||
//brush.setBackground(currentBackgroundColor);
|
//brush.setBackground(currentBackgroundColor);
|
||||||
brush.setFont(currentFont);
|
brush.setFont(currentFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void paintCircleProgress(Graphics2D brush, Visibility visibility, int totalWidth, int totalHeight) {
|
||||||
|
Color currentColor = brush.getColor();
|
||||||
|
brush.setColor(
|
||||||
|
visibility.isStronglyColored() ? HIGH_STRONGLY_COLORED
|
||||||
|
: (visibility.isWeaklyColored() ? HIGH_WEAKLY_COLORED
|
||||||
|
: Color.lightGray));
|
||||||
|
|
||||||
|
double angleDouble = donePercent() * 360;
|
||||||
|
|
||||||
|
brush.fillArc(((int) (totalWidth * 1)) - 15,
|
||||||
|
totalHeight / 4 * 3 + 28,
|
||||||
|
15, 15, 90, -(int) angleDouble);
|
||||||
|
brush.setColor(
|
||||||
|
visibility.isStronglyColored() ? LIGHT_RED
|
||||||
|
: visibility.isWeaklyColored() ? ULTRA_LIGHT_RED
|
||||||
|
: BACKGROUND_COLOR);
|
||||||
|
brush.fillArc(((int) (totalWidth * 1)) - 15,
|
||||||
|
totalHeight / 4 * 3 + 28,
|
||||||
|
15, 15, 90, +(int) (360 - angleDouble));
|
||||||
|
|
||||||
|
brush.setColor(currentColor);
|
||||||
|
}
|
||||||
|
|
||||||
public void hideWidget() {
|
public void hideWidget() {
|
||||||
this.hidden = true;
|
this.hidden = true;
|
||||||
|
@ -28,6 +28,7 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javax.swing.JMenuItem;
|
import javax.swing.JMenuItem;
|
||||||
|
import org.nanoboot.utils.timecalc.entity.Progress;
|
||||||
|
|
||||||
//https://kodejava.org/how-do-i-write-a-simple-analog-clock-using-java-2d/
|
//https://kodejava.org/how-do-i-write-a-simple-analog-clock-using-java-2d/
|
||||||
public class AnalogClock extends Widget {
|
public class AnalogClock extends Widget {
|
||||||
@ -68,6 +69,10 @@ public class AnalogClock extends Widget {
|
|||||||
TimeCalcProperty.CLOCK_DATE_VISIBLE_ONLY_IF_MOUSE_MOVING_OVER
|
TimeCalcProperty.CLOCK_DATE_VISIBLE_ONLY_IF_MOUSE_MOVING_OVER
|
||||||
.getKey());
|
.getKey());
|
||||||
|
|
||||||
|
public BooleanProperty circleProgressVisibleProperty
|
||||||
|
= new BooleanProperty(TimeCalcProperty.BATTERY_CIRCLE_PROGRESS_VISIBLE
|
||||||
|
.getKey(), true);
|
||||||
|
|
||||||
public IntegerProperty startHourProperty
|
public IntegerProperty startHourProperty
|
||||||
= new IntegerProperty("startHourProperty");
|
= new IntegerProperty("startHourProperty");
|
||||||
public IntegerProperty startMinuteProperty
|
public IntegerProperty startMinuteProperty
|
||||||
@ -194,14 +199,14 @@ public class AnalogClock extends Widget {
|
|||||||
int nowMS = now.toTotalMilliseconds();
|
int nowMS = now.toTotalMilliseconds();
|
||||||
int total = endMS - startMS;
|
int total = endMS - startMS;
|
||||||
int done = nowMS - startMS;
|
int done = nowMS - startMS;
|
||||||
double progress = ((double)done) / ((double)total);
|
double progress_ = ((double) done) / ((double) total);
|
||||||
this.dayProgress = progress;
|
this.dayProgress = progress_;
|
||||||
|
|
||||||
//System.out.println("clock.handsLongProperty=" + handsLongProperty.isEnabled());
|
//System.out.println("clock.handsLongProperty=" + handsLongProperty.isEnabled());
|
||||||
Visibility visibility
|
Visibility visibility
|
||||||
= Visibility.valueOf(visibilityProperty.getValue());
|
= Visibility.valueOf(visibilityProperty.getValue());
|
||||||
Graphics2D g2d = (Graphics2D) g;
|
Graphics2D brush = (Graphics2D) g;
|
||||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
brush.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
||||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
|
||||||
this.side = Math.min(getWidth(), getHeight());
|
this.side = Math.min(getWidth(), getHeight());
|
||||||
@ -220,27 +225,26 @@ public class AnalogClock extends Widget {
|
|||||||
if ((mouseOver || progressVisibleOnlyIfMouseMovingOverProperty
|
if ((mouseOver || progressVisibleOnlyIfMouseMovingOverProperty
|
||||||
.isDisabled()) && visibility.isStronglyColored()) {
|
.isDisabled()) && visibility.isStronglyColored()) {
|
||||||
|
|
||||||
Color currentColor = g2d.getColor();
|
Color currentColor = brush.getColor();
|
||||||
|
|
||||||
|
brush.setColor(Battery.getColourForProgress(progress_, Visibility.WEAKLY_COLORED, mouseOver));
|
||||||
g2d.setColor(Battery.getColourForProgress(progress, Visibility.WEAKLY_COLORED, mouseOver));
|
|
||||||
int startAngle = computeStartAngle();
|
int startAngle = computeStartAngle();
|
||||||
g2d.fillArc(0, 0, side, side, -startAngle + 90,
|
brush.fillArc(0, 0, side, side, -startAngle + 90,
|
||||||
startAngle - computeEndAngle());
|
startAngle - computeEndAngle());
|
||||||
|
|
||||||
//System.out.println("ANGLES: " + startAngle + " " + endAngle + " " + angleDiff );
|
//System.out.println("ANGLES: " + startAngle + " " + endAngle + " " + angleDiff );
|
||||||
g2d.setColor(currentColor);
|
brush.setColor(currentColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (millisecondEnabledProperty.isEnabled() && secondEnabledProperty
|
if (millisecondEnabledProperty.isEnabled() && secondEnabledProperty
|
||||||
.isEnabled() && minuteEnabledProperty.isEnabled()
|
.isEnabled() && minuteEnabledProperty.isEnabled()
|
||||||
&& hourEnabledProperty.isEnabled()) {
|
&& hourEnabledProperty.isEnabled()) {
|
||||||
drawHand(g2d, side / 2 - 10, millisecond / 1000.0, 1.0f,
|
drawHand(brush, side / 2 - 10, millisecond / 1000.0, 1.0f,
|
||||||
COLOR_FOR_MILLISECOND_HAND_STRONGLY_COLORED, visibility);
|
COLOR_FOR_MILLISECOND_HAND_STRONGLY_COLORED, visibility);
|
||||||
|
|
||||||
if (handsLongProperty.isEnabled()) {
|
if (handsLongProperty.isEnabled()) {
|
||||||
drawHand(g2d, (side / 2 - 10) / 4,
|
drawHand(brush, (side / 2 - 10) / 4,
|
||||||
(millisecond > 500 ? millisecond - 500
|
(millisecond > 500 ? millisecond - 500
|
||||||
: millisecond + 500) / 1000.0, 1.0f,
|
: millisecond + 500) / 1000.0, 1.0f,
|
||||||
COLOR_FOR_MILLISECOND_HAND_STRONGLY_COLORED,
|
COLOR_FOR_MILLISECOND_HAND_STRONGLY_COLORED,
|
||||||
@ -250,11 +254,11 @@ public class AnalogClock extends Widget {
|
|||||||
|
|
||||||
if (secondEnabledProperty.isEnabled() && minuteEnabledProperty
|
if (secondEnabledProperty.isEnabled() && minuteEnabledProperty
|
||||||
.isEnabled() && hourEnabledProperty.isEnabled()) {
|
.isEnabled() && hourEnabledProperty.isEnabled()) {
|
||||||
drawHand(g2d, side / 2 - 10, second / 60.0, 0.5f, Color.RED,
|
drawHand(brush, side / 2 - 10, second / 60.0, 0.5f, Color.RED,
|
||||||
visibility);
|
visibility);
|
||||||
|
|
||||||
if (handsLongProperty.isEnabled()) {
|
if (handsLongProperty.isEnabled()) {
|
||||||
drawHand(g2d, (side / 2 - 10) / 4,
|
drawHand(brush, (side / 2 - 10) / 4,
|
||||||
(second > 30 ? second - 30 : second + 30) / 60.0, 0.5f,
|
(second > 30 ? second - 30 : second + 30) / 60.0, 0.5f,
|
||||||
Color.RED, visibility);
|
Color.RED, visibility);
|
||||||
}
|
}
|
||||||
@ -262,10 +266,10 @@ public class AnalogClock extends Widget {
|
|||||||
if (minuteEnabledProperty.isEnabled() && hourEnabledProperty
|
if (minuteEnabledProperty.isEnabled() && hourEnabledProperty
|
||||||
.isEnabled()) {
|
.isEnabled()) {
|
||||||
double minutes = minute / 60.0 + second / 60.0 / 60.0;
|
double minutes = minute / 60.0 + second / 60.0 / 60.0;
|
||||||
drawHand(g2d, side / 2 - 20, minutes, 2.0f,
|
drawHand(brush, side / 2 - 20, minutes, 2.0f,
|
||||||
Color.BLUE, visibility);
|
Color.BLUE, visibility);
|
||||||
if (handsLongProperty.isEnabled()) {
|
if (handsLongProperty.isEnabled()) {
|
||||||
drawHand(g2d, (side / 2 - 20) / 4,
|
drawHand(brush, (side / 2 - 20) / 4,
|
||||||
minutes + minutes > 0.5 ? minutes - 0.5
|
minutes + minutes > 0.5 ? minutes - 0.5
|
||||||
: minutes + (minutes > 0.5 ? (-1) : 1) * 0.5,
|
: minutes + (minutes > 0.5 ? (-1) : 1) * 0.5,
|
||||||
2.0f,
|
2.0f,
|
||||||
@ -275,11 +279,11 @@ public class AnalogClock extends Widget {
|
|||||||
if (hourEnabledProperty.isEnabled()) {
|
if (hourEnabledProperty.isEnabled()) {
|
||||||
double hours
|
double hours
|
||||||
= hour / 12.0 + minute / 60.0 / 12 + second / 60 / 60 / 12;
|
= hour / 12.0 + minute / 60.0 / 12 + second / 60 / 60 / 12;
|
||||||
drawHand(g2d, side / 2 - 40,
|
drawHand(brush, side / 2 - 40,
|
||||||
hours, 4.0f,
|
hours, 4.0f,
|
||||||
Color.BLACK, visibility);
|
Color.BLACK, visibility);
|
||||||
if (handsLongProperty.isEnabled()) {
|
if (handsLongProperty.isEnabled()) {
|
||||||
drawHand(g2d, (side / 2 - 40) / 4,
|
drawHand(brush, (side / 2 - 40) / 4,
|
||||||
hours + hours > 0.5 ? hours - 0.5
|
hours + hours > 0.5 ? hours - 0.5
|
||||||
: hours + (hours > 0.5 ? (-1) : 1) * 0.5, 4.0f,
|
: hours + (hours > 0.5 ? (-1) : 1) * 0.5, 4.0f,
|
||||||
Color.BLACK, visibility);
|
Color.BLACK, visibility);
|
||||||
@ -290,16 +294,25 @@ public class AnalogClock extends Widget {
|
|||||||
if (borderOnlyHoursProperty.isEnabled() && minuteI % 5 != 0) {
|
if (borderOnlyHoursProperty.isEnabled() && minuteI % 5 != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
drawBorder(g2d, minuteI, minuteI % 5 == 0
|
drawBorder(brush, minuteI, minuteI % 5 == 0
|
||||||
? (numbersVisibleProperty.isEnabled() ? 2f : 4f) : 1f,
|
? (numbersVisibleProperty.isEnabled() ? 2f : 4f) : 1f,
|
||||||
Color.BLACK, visibility);
|
Color.BLACK, visibility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (centreCircleVisibleProperty.isEnabled()) {
|
if (centreCircleVisibleProperty.isEnabled()) {
|
||||||
drawCentreCircle(g2d, centerX, centerY);
|
drawCentreCircle(brush, centerX, centerY);
|
||||||
|
}
|
||||||
|
|
||||||
|
drawClockFace(brush, centerX, centerY, side / 2 - 40, visibility);
|
||||||
|
|
||||||
|
if (progress == null) {
|
||||||
|
progress = new Progress();
|
||||||
|
}
|
||||||
|
progress.set(WidgetType.DAY, (hour * 60 * 60 + minute * 60 + second) / (24d * 60d * 60d));
|
||||||
|
if (circleProgressVisibleProperty.isEnabled()) {
|
||||||
|
paintCircleProgress(brush, visibility, getWidth(), getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
drawClockFace(g2d, centerX, centerY, side / 2 - 40, visibility);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,13 +406,20 @@ public class AnalogClock extends Widget {
|
|||||||
((int) (side * 0.35)) + 60);
|
((int) (side * 0.35)) + 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(percentProgressVisibleProperty.isEnabled()) {
|
if (percentProgressVisibleProperty.isEnabled()) {
|
||||||
brush.drawString(((int) Math.floor(dayProgress * 100)) + "%",
|
int d = (int) Math.floor(dayProgress * 100);
|
||||||
|
if(d < 0) {
|
||||||
|
d = 0;
|
||||||
|
}
|
||||||
|
if(d > 100) {
|
||||||
|
d = 100;
|
||||||
|
}
|
||||||
|
brush.drawString(d + "%",
|
||||||
((int) (side * 0.25)),
|
((int) (side * 0.25)),
|
||||||
((int) (side * 0.35)) + 35);
|
((int) (side * 0.35)) + 35);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(smileyVisibleProperty.isEnabled()) {
|
if (smileyVisibleProperty.isEnabled()) {
|
||||||
paintSmiley(visibility, brush, ((int) (side * 0.25) + 90),
|
paintSmiley(visibility, brush, ((int) (side * 0.25) + 90),
|
||||||
((int) (side * 0.35)) + 20);
|
((int) (side * 0.35)) + 20);
|
||||||
}
|
}
|
||||||
@ -423,7 +443,7 @@ public class AnalogClock extends Widget {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JMenuItem> createAdditionalMenus() {
|
public List<JMenuItem> createAdditionalMenus() {
|
||||||
if(menuItems == null) {
|
if (menuItems == null) {
|
||||||
menuItems = new ArrayList<>();
|
menuItems = new ArrayList<>();
|
||||||
JMenu hands = new JMenu("Hands");
|
JMenu hands = new JMenu("Hands");
|
||||||
menuItems.add(hands);
|
menuItems.add(hands);
|
||||||
@ -473,6 +493,7 @@ public class AnalogClock extends Widget {
|
|||||||
}
|
}
|
||||||
return this.menuItems;
|
return this.menuItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Consumer<Object> createRefreshConsumer() {
|
protected Consumer<Object> createRefreshConsumer() {
|
||||||
return (o) -> {
|
return (o) -> {
|
||||||
millisecondHandMenuItem.disableMenuItem();
|
millisecondHandMenuItem.disableMenuItem();
|
||||||
|
@ -325,7 +325,7 @@ public class Battery extends Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (circleProgressVisibleProperty.isEnabled()) {
|
if (circleProgressVisibleProperty.isEnabled()) {
|
||||||
paintCircleProgress(brush, visibility);
|
paintCircleProgress(brush, visibility, totalWidth, totalHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (donePercent > 0) {
|
if (donePercent > 0) {
|
||||||
@ -376,29 +376,6 @@ public class Battery extends Widget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void paintCircleProgress(Graphics2D brush, Visibility visibility) {
|
|
||||||
Color currentColor = brush.getColor();
|
|
||||||
brush.setColor(
|
|
||||||
visibility.isStronglyColored() ? HIGH_STRONGLY_COLORED
|
|
||||||
: (visibility.isWeaklyColored() ? HIGH_WEAKLY_COLORED
|
|
||||||
: Color.lightGray));
|
|
||||||
|
|
||||||
double angleDouble = donePercent() * 360;
|
|
||||||
|
|
||||||
brush.fillArc(((int) (totalWidth * 0.45)) + 15,
|
|
||||||
totalHeight / 4 * 3 + 28,
|
|
||||||
15, 15, 90, -(int) angleDouble);
|
|
||||||
brush.setColor(
|
|
||||||
visibility.isStronglyColored() ? LIGHT_RED
|
|
||||||
: visibility.isWeaklyColored() ? ULTRA_LIGHT_RED
|
|
||||||
: BACKGROUND_COLOR);
|
|
||||||
brush.fillArc(((int) (totalWidth * 0.45)) + 15,
|
|
||||||
totalHeight / 4 * 3 + 28,
|
|
||||||
15, 15, 90, +(int) (360 - angleDouble));
|
|
||||||
|
|
||||||
brush.setColor(currentColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
private double getRandom(int index) {
|
private double getRandom(int index) {
|
||||||
return getRandom(index, false);
|
return getRandom(index, false);
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,10 @@ public class ConfigWindow extends TWindow {
|
|||||||
= new JCheckBox(
|
= new JCheckBox(
|
||||||
TimeCalcProperty.CLOCK_PERCENT_PROGRESS_VISIBLE
|
TimeCalcProperty.CLOCK_PERCENT_PROGRESS_VISIBLE
|
||||||
.getKey());
|
.getKey());
|
||||||
|
private final JCheckBox clockCircleProgressVisibleProperty
|
||||||
|
= new JCheckBox(
|
||||||
|
TimeCalcProperty.CLOCK_CIRCLE_PROGRESS_VISIBLE
|
||||||
|
.getKey());
|
||||||
//
|
//
|
||||||
private final JCheckBox batteryWavesVisibleProperty
|
private final JCheckBox batteryWavesVisibleProperty
|
||||||
= new JCheckBox(TimeCalcProperty.BATTERY_WAVES_VISIBLE.getKey());
|
= new JCheckBox(TimeCalcProperty.BATTERY_WAVES_VISIBLE.getKey());
|
||||||
@ -362,6 +366,7 @@ public class ConfigWindow extends TWindow {
|
|||||||
.setSelected(false);
|
.setSelected(false);
|
||||||
clockSmileyVisibleProperty.setSelected(enable);
|
clockSmileyVisibleProperty.setSelected(enable);
|
||||||
clockPercentProgressVisibleProperty.setSelected(enable);
|
clockPercentProgressVisibleProperty.setSelected(enable);
|
||||||
|
clockCircleProgressVisibleProperty.setSelected(enable);
|
||||||
batteryVisibleProperty.setSelected(true);
|
batteryVisibleProperty.setSelected(true);
|
||||||
batteryWavesVisibleProperty.setSelected(enable);
|
batteryWavesVisibleProperty.setSelected(enable);
|
||||||
batteryCircleProgressVisibleProperty.setSelected(enable);
|
batteryCircleProgressVisibleProperty.setSelected(enable);
|
||||||
@ -417,6 +422,7 @@ public class ConfigWindow extends TWindow {
|
|||||||
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
||||||
clockSmileyVisibleProperty,
|
clockSmileyVisibleProperty,
|
||||||
clockPercentProgressVisibleProperty,
|
clockPercentProgressVisibleProperty,
|
||||||
|
clockCircleProgressVisibleProperty,
|
||||||
batteryVisibleProperty,
|
batteryVisibleProperty,
|
||||||
batteryWavesVisibleProperty,
|
batteryWavesVisibleProperty,
|
||||||
batteryCircleProgressVisibleProperty,
|
batteryCircleProgressVisibleProperty,
|
||||||
|
@ -605,6 +605,7 @@ public class MainWindow extends TWindow {
|
|||||||
.bindTo(timeCalcConfiguration.clockVisibleProperty);
|
.bindTo(timeCalcConfiguration.clockVisibleProperty);
|
||||||
clock.percentProgressVisibleProperty.bindTo(timeCalcConfiguration.clockPercentProgressVisibleProperty);
|
clock.percentProgressVisibleProperty.bindTo(timeCalcConfiguration.clockPercentProgressVisibleProperty);
|
||||||
clock.smileyVisibleProperty.bindTo(timeCalcConfiguration.clockSmileyVisibleProperty);
|
clock.smileyVisibleProperty.bindTo(timeCalcConfiguration.clockSmileyVisibleProperty);
|
||||||
|
clock.circleProgressVisibleProperty.bindTo(timeCalcConfiguration.clockCircleProgressVisibleProperty);
|
||||||
|
|
||||||
ComponentRegistry<Component> componentRegistry
|
ComponentRegistry<Component> componentRegistry
|
||||||
= new ComponentRegistry();
|
= new ComponentRegistry();
|
||||||
|
@ -20,6 +20,7 @@ clock.progress.visible-only-if-mouse-moving-over=true
|
|||||||
clock.date.visible-only-if-mouse-moving-over=true
|
clock.date.visible-only-if-mouse-moving-over=true
|
||||||
clock.smiley.visible=false
|
clock.smiley.visible=false
|
||||||
clock.percent-progress.visible=false
|
clock.percent-progress.visible=false
|
||||||
|
clock.circle-progress.visible=true
|
||||||
#
|
#
|
||||||
battery.waves.visible=true
|
battery.waves.visible=true
|
||||||
battery.circle-progress.visible=true
|
battery.circle-progress.visible=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user