mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 15:37:51 +01:00
Added several improvements
This commit is contained in:
parent
b391b2caf8
commit
a9ee1ed4c9
@ -70,8 +70,8 @@ public class TimeCalcConfiguration {
|
||||
public final BooleanProperty clockCentreCircleVisibleProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_VISIBLE
|
||||
.getKey());
|
||||
public final BooleanProperty clockCentreCircleBlackProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_BLACK
|
||||
public final BooleanProperty clockCentreCircleColoredProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_COLORED
|
||||
.getKey());
|
||||
public final BooleanProperty clockProgressVisibleOnlyIfMouseMovingOverProperty
|
||||
= new BooleanProperty(
|
||||
@ -291,7 +291,7 @@ public class TimeCalcConfiguration {
|
||||
clockCircleStrongBorderProperty,
|
||||
clockCircleBorderColorProperty,
|
||||
clockCentreCircleVisibleProperty,
|
||||
clockCentreCircleBlackProperty,
|
||||
clockCentreCircleColoredProperty,
|
||||
clockProgressVisibleOnlyIfMouseMovingOverProperty,
|
||||
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
||||
clockSmileyVisibleProperty,
|
||||
|
@ -40,8 +40,8 @@ public enum TimeCalcProperty {
|
||||
Color.class),
|
||||
CLOCK_CENTRE_CIRCLE_VISIBLE("clock.centre-circle.visible",
|
||||
"Clock : Centre circle"),
|
||||
CLOCK_CENTRE_CIRCLE_BLACK("clock.centre-circle.black",
|
||||
"Clock : Centre Circle is black"),
|
||||
CLOCK_CENTRE_CIRCLE_COLORED("clock.centre-circle.colored",
|
||||
"Clock : Centre Circle is colored"),
|
||||
CLOCK_PROGRESS_VISIBLE_ONLY_IF_MOUSE_MOVING_OVER(
|
||||
"clock.progress.visible-only-if-mouse-moving-over",
|
||||
"Clock : Progress visible only, if mouse moving over"),
|
||||
|
@ -689,7 +689,7 @@ public class TimeCalcKeyAdapter extends KeyAdapter {
|
||||
timeCalcConfiguration.clockCircleStrongBorderProperty.disable();
|
||||
timeCalcConfiguration.clockCircleBorderColorProperty.setValue("0,0,255");
|
||||
timeCalcConfiguration.clockCentreCircleVisibleProperty.enable();
|
||||
timeCalcConfiguration.clockCentreCircleBlackProperty.disable();
|
||||
timeCalcConfiguration.clockCentreCircleColoredProperty.disable();
|
||||
timeCalcConfiguration.clockProgressVisibleOnlyIfMouseMovingOverProperty.disable();
|
||||
timeCalcConfiguration.clockDateVisibleOnlyIfMouseMovingOverProperty.disable();
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
package org.nanoboot.utils.timecalc.swing.common;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.nanoboot.utils.timecalc.app.GetProperty;
|
||||
import org.nanoboot.utils.timecalc.app.TimeCalcProperty;
|
||||
import org.nanoboot.utils.timecalc.entity.Progress;
|
||||
import org.nanoboot.utils.timecalc.entity.Visibility;
|
||||
import org.nanoboot.utils.timecalc.entity.WidgetType;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.ProgressSmileyIcon;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.ProgressSwing;
|
||||
import org.nanoboot.utils.timecalc.utils.common.ProgressSmiley;
|
||||
@ -31,10 +30,10 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.function.Consumer;
|
||||
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;
|
||||
import static org.nanoboot.utils.timecalc.swing.progress.battery.Battery.HIGH_STRONGLY_COLORED;
|
||||
import static org.nanoboot.utils.timecalc.swing.progress.battery.Battery.HIGH_WEAKLY_COLORED;
|
||||
import static org.nanoboot.utils.timecalc.swing.progress.battery.Battery.LIGHT_RED;
|
||||
import static org.nanoboot.utils.timecalc.swing.progress.battery.Battery.ULTRA_LIGHT_RED;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
||||
|
@ -3,7 +3,7 @@ package org.nanoboot.utils.timecalc.swing.common;
|
||||
import org.nanoboot.utils.timecalc.app.TimeCalcException;
|
||||
import org.nanoboot.utils.timecalc.entity.WidgetType;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.AnalogClock;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.weather.ProgressWeather;
|
||||
|
||||
import javax.swing.JMenu;
|
||||
|
@ -6,6 +6,7 @@ import org.nanoboot.utils.timecalc.entity.WidgetType;
|
||||
import org.nanoboot.utils.timecalc.swing.common.SwingUtils;
|
||||
import org.nanoboot.utils.timecalc.swing.common.Widget;
|
||||
import org.nanoboot.utils.timecalc.swing.controls.TMenuItem;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.Battery;
|
||||
import org.nanoboot.utils.timecalc.utils.common.DateFormats;
|
||||
import org.nanoboot.utils.timecalc.utils.common.TTime;
|
||||
import org.nanoboot.utils.timecalc.utils.property.BooleanProperty;
|
||||
@ -34,8 +35,8 @@ import org.nanoboot.utils.timecalc.entity.Progress;
|
||||
public class AnalogClock extends Widget {
|
||||
|
||||
public static final Color COLOR_FOR_MILLISECOND_HAND_STRONGLY_COLORED
|
||||
= new Color(246,
|
||||
152, 51);
|
||||
= new Color(226,
|
||||
126, 19);
|
||||
public final BooleanProperty borderVisibleProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_BORDER_VISIBLE
|
||||
.getKey());
|
||||
@ -57,8 +58,8 @@ public class AnalogClock extends Widget {
|
||||
public final StringProperty centreCircleBorderColorProperty
|
||||
= new StringProperty(TimeCalcProperty.CLOCK_CIRCLE_BORDER_COLOR
|
||||
.getKey());
|
||||
public final BooleanProperty centreCircleBlackProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_BLACK
|
||||
public final BooleanProperty centreCircleColoredProperty
|
||||
= new BooleanProperty(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_COLORED
|
||||
.getKey());
|
||||
public final BooleanProperty progressVisibleOnlyIfMouseMovingOverProperty
|
||||
= new BooleanProperty(
|
||||
@ -321,8 +322,7 @@ public class AnalogClock extends Widget {
|
||||
Visibility visibility
|
||||
= Visibility.valueOf(visibilityProperty.getValue());
|
||||
brush.setColor(visibility.isStronglyColored() || mouseOver
|
||||
? (centreCircleBlackProperty.isEnabled() ? Color.BLACK
|
||||
: Color.RED)
|
||||
? (centreCircleColoredProperty.isEnabled() ? Color.RED : Color.BLACK)
|
||||
: FOREGROUND_COLOR);
|
||||
brush.fillOval(centerX - 3, centerY - 3, 8, 8);
|
||||
brush.setColor(currentColor);
|
||||
@ -422,6 +422,15 @@ public class AnalogClock extends Widget {
|
||||
if (smileyVisibleProperty.isEnabled()) {
|
||||
paintSmiley(visibility, brush, ((int) (side * 0.25) + 90),
|
||||
((int) (side * 0.35)) + 20);
|
||||
} else {
|
||||
if(this.smileyIcon != null) {
|
||||
remove(this.smileyIcon);
|
||||
this.smileyIcon = null;
|
||||
}
|
||||
if(this.smileyIcon2 != null) {
|
||||
remove(this.smileyIcon2);
|
||||
this.smileyIcon2 = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (numbersVisibleProperty.isEnabled()) {
|
||||
|
@ -2,6 +2,7 @@ package org.nanoboot.utils.timecalc.swing.progress;
|
||||
|
||||
import org.nanoboot.utils.timecalc.entity.Visibility;
|
||||
import org.nanoboot.utils.timecalc.swing.common.Widget;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.Battery;
|
||||
import org.nanoboot.utils.timecalc.utils.common.NumberFormats;
|
||||
|
||||
import java.awt.Color;
|
||||
|
@ -59,6 +59,9 @@ public class ProgressLife extends Widget implements GetProperty {
|
||||
}).start();
|
||||
|
||||
}
|
||||
public int getTimerDelay() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintWidget(Graphics brush) {
|
||||
|
@ -50,6 +50,10 @@ public class ProgressMoney extends Widget implements GetProperty {
|
||||
|
||||
}
|
||||
|
||||
public int getTimerDelay() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintWidget(Graphics brush) {
|
||||
double perMonth = this.perMonthProperty.getValue();
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.nanoboot.utils.timecalc.app.TimeCalcProperty;
|
@ -1,4 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -1,6 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
|
||||
import org.nanoboot.utils.timecalc.utils.common.TTime;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -1,4 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -1,4 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -1,4 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -1,6 +1,4 @@
|
||||
package org.nanoboot.utils.timecalc.swing.progress;
|
||||
|
||||
import java.util.Calendar;
|
||||
package org.nanoboot.utils.timecalc.swing.progress.battery;
|
||||
|
||||
/**
|
||||
* @author Robert Vokac
|
@ -64,6 +64,10 @@ public class ProgressWeather extends Widget implements GetProperty {
|
||||
|
||||
private static Map<Integer, List<WeatherForecast>> forecastsForYears = new HashMap<>();
|
||||
|
||||
public int getTimerDelay() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintWidget(Graphics brush) {
|
||||
|
||||
|
@ -67,10 +67,12 @@ public class ConfigWindow extends TWindow {
|
||||
private final JPanel panelInsideScrollPaneLife;
|
||||
private final JPanel panelInsideScrollPaneMoney;
|
||||
private final JPanel panelInsideScrollPaneSmileys;
|
||||
private final JPanel panelInsideScrollPaneProgress;
|
||||
private final JPanel panelInsideScrollPaneTest;
|
||||
private final JPanel panelInsideScrollPaneOther;
|
||||
private final int[] currentY = new int[]{SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN};
|
||||
private final int[] currentX = new int[]{SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN};
|
||||
private final int[] currentY = new int[]{SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN};
|
||||
private final int[] currentX = new int[]{SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN, SwingUtils.MARGIN};
|
||||
|
||||
private final List<JComponent> propertiesList = new ArrayList<>();
|
||||
private final Map<TimeCalcProperty, JComponent> propertiesMap = new HashMap<>();
|
||||
private final TButton enableAsMuchAsPossible
|
||||
@ -110,8 +112,8 @@ public class ConfigWindow extends TWindow {
|
||||
private final JCheckBox clockCentreCircleVisibleProperty
|
||||
= new JCheckBox(
|
||||
TimeCalcProperty.CLOCK_CENTRE_CIRCLE_VISIBLE.getKey());
|
||||
private final JCheckBox clockCentreCircleBlackProperty
|
||||
= new JCheckBox(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_BLACK.getKey());
|
||||
private final JCheckBox clockCentreCircleColoredProperty
|
||||
= new JCheckBox(TimeCalcProperty.CLOCK_CENTRE_CIRCLE_COLORED.getKey());
|
||||
private final JCheckBox clockProgressVisibleOnlyIfMouseMovingOverProperty
|
||||
= new JCheckBox(
|
||||
TimeCalcProperty.CLOCK_PROGRESS_VISIBLE_ONLY_IF_MOUSE_MOVING_OVER
|
||||
@ -299,6 +301,7 @@ public class ConfigWindow extends TWindow {
|
||||
this.panelInsideScrollPaneLife = new JPanel();
|
||||
this.panelInsideScrollPaneMoney = new JPanel();
|
||||
this.panelInsideScrollPaneSmileys = new JPanel();
|
||||
this.panelInsideScrollPaneProgress = new JPanel();
|
||||
this.panelInsideScrollPaneTest = new JPanel();
|
||||
this.panelInsideScrollPaneOther = new JPanel();
|
||||
|
||||
@ -308,6 +311,7 @@ public class ConfigWindow extends TWindow {
|
||||
panelInsideScrollPaneLife,
|
||||
panelInsideScrollPaneMoney,
|
||||
panelInsideScrollPaneSmileys,
|
||||
panelInsideScrollPaneProgress,
|
||||
panelInsideScrollPaneTest,
|
||||
panelInsideScrollPaneOther).collect(Collectors.toList());
|
||||
panelsInsideScrollPane.forEach(p -> {
|
||||
@ -327,6 +331,7 @@ public class ConfigWindow extends TWindow {
|
||||
JScrollPane scrollPaneLife = new JScrollPane(panelInsideScrollPaneLife);
|
||||
JScrollPane scrollPaneMoney = new JScrollPane(panelInsideScrollPaneMoney);
|
||||
JScrollPane scrollPaneSmileys = new JScrollPane(panelInsideScrollPaneSmileys);
|
||||
JScrollPane scrollPaneProgress = new JScrollPane(panelInsideScrollPaneProgress);
|
||||
JScrollPane scrollPaneTest = new JScrollPane(panelInsideScrollPaneTest);
|
||||
JScrollPane scrollPaneOther = new JScrollPane(panelInsideScrollPaneOther);
|
||||
|
||||
@ -336,6 +341,7 @@ public class ConfigWindow extends TWindow {
|
||||
scrollPaneLife,
|
||||
scrollPaneMoney,
|
||||
scrollPaneSmileys,
|
||||
scrollPaneProgress,
|
||||
scrollPaneTest,
|
||||
scrollPaneOther
|
||||
).collect(Collectors.toList());
|
||||
@ -345,6 +351,7 @@ public class ConfigWindow extends TWindow {
|
||||
tp.add("Life", scrollPaneLife);
|
||||
tp.add("Money", scrollPaneMoney);
|
||||
tp.add("Smileys", scrollPaneSmileys);
|
||||
tp.add("Progress", scrollPaneProgress);
|
||||
tp.add("Test", scrollPaneTest);
|
||||
tp.add("Other", scrollPaneOther);
|
||||
scrollPanes.forEach(s
|
||||
@ -402,7 +409,7 @@ public class ConfigWindow extends TWindow {
|
||||
.setValue(enable ? "0,0,255" : "0,0,0");
|
||||
|
||||
clockCentreCircleVisibleProperty.setSelected(enable);
|
||||
clockCentreCircleBlackProperty.setSelected(!enable);
|
||||
clockCentreCircleColoredProperty.setSelected(!enable);
|
||||
clockProgressVisibleOnlyIfMouseMovingOverProperty
|
||||
.setSelected(!enable);
|
||||
clockDateVisibleOnlyIfMouseMovingOverProperty
|
||||
@ -437,6 +444,12 @@ public class ConfigWindow extends TWindow {
|
||||
dotVisibleProperty.setSelected(enable);
|
||||
lifeVisibleProperty.setSelected(enable);
|
||||
moneyVisibleProperty.setSelected(enable);
|
||||
if(enable && moneyPerMonthProperty.getText().isEmpty()) {
|
||||
moneyPerMonthProperty.setText("1000000");
|
||||
}
|
||||
if(enable && moneyCurrencyProperty.getText().isEmpty()) {
|
||||
moneyPerMonthProperty.setText("$TT");
|
||||
}
|
||||
weatherVisibleProperty.setSelected(enable);
|
||||
circleVisibleProperty.setSelected(enable);
|
||||
swingVisibleProperty.setSelected(enable);
|
||||
@ -459,10 +472,9 @@ public class ConfigWindow extends TWindow {
|
||||
// dotHiddenProperty.setSelected(!enable);
|
||||
if (enable) {
|
||||
speedProperty.setText("0");
|
||||
speedFloatingProperty.setSelected(true);
|
||||
}
|
||||
if (!enable) {
|
||||
speedProperty.setText(String.valueOf(Integer.MIN_VALUE));
|
||||
speedProperty.setText(String.valueOf(Integer.MAX_VALUE));
|
||||
speedFloatingProperty.setSelected(false);
|
||||
}
|
||||
MainWindow.hideShowFormsCheckBox.setSelected(enable);
|
||||
@ -485,7 +497,7 @@ public class ConfigWindow extends TWindow {
|
||||
clockCircleStrongBorderProperty,
|
||||
clockCircleBorderColorProperty,
|
||||
clockCentreCircleVisibleProperty,
|
||||
clockCentreCircleBlackProperty,
|
||||
clockCentreCircleColoredProperty,
|
||||
clockProgressVisibleOnlyIfMouseMovingOverProperty,
|
||||
clockDateVisibleOnlyIfMouseMovingOverProperty,
|
||||
clockSmileyVisibleProperty,
|
||||
@ -530,12 +542,12 @@ public class ConfigWindow extends TWindow {
|
||||
squareVisibleProperty,
|
||||
squareHiddenProperty,
|
||||
squareTypeProperty,
|
||||
dotVisibleProperty,
|
||||
dotHiddenProperty,
|
||||
dotTypeProperty,
|
||||
circleVisibleProperty,
|
||||
circleHiddenProperty,
|
||||
circleTypeProperty,
|
||||
dotVisibleProperty,
|
||||
dotHiddenProperty,
|
||||
dotTypeProperty,
|
||||
swingVisibleProperty,
|
||||
swingHiddenProperty,
|
||||
swingTypeProperty,
|
||||
@ -687,7 +699,9 @@ public class ConfigWindow extends TWindow {
|
||||
String groupName = array[0];
|
||||
if (groupName.equals("Clock") || groupName.equals("Battery")
|
||||
|| groupName.equals("Smileys")
|
||||
|| groupName.equals("Test")) {
|
||||
|| groupName.equals("Test")
|
||||
|| groupName.equals("Money")
|
||||
|| groupName.equals("Life")) {
|
||||
|
||||
checkBox.setText(array.length > 1 ? (checkBox.getText()
|
||||
.substring(groupName.length() + 3)) : "Visible");
|
||||
@ -867,6 +881,9 @@ public class ConfigWindow extends TWindow {
|
||||
});
|
||||
}
|
||||
|
||||
if(timeCalcConfiguration.speedProperty.getValue() == Integer.MIN_VALUE) {
|
||||
timeCalcConfiguration.speedProperty.setValue(Integer.MAX_VALUE);
|
||||
}
|
||||
propertiesMap.put(TimeCalcProperty.forKey(
|
||||
(String) p.getClientProperty(CLIENT_PROPERTY_KEY)), p);
|
||||
addToNextRow(p);
|
||||
@ -934,7 +951,7 @@ public class ConfigWindow extends TWindow {
|
||||
}
|
||||
|
||||
private void addToNextRow(JComponent jComponent, boolean nextRow) {
|
||||
int index = 6;
|
||||
int index = 7;
|
||||
String key = (String) jComponent.getClientProperty(CLIENT_PROPERTY_KEY);
|
||||
if (key == null) {
|
||||
//nothing to do
|
||||
@ -959,6 +976,10 @@ public class ConfigWindow extends TWindow {
|
||||
index = 5;
|
||||
}
|
||||
|
||||
if (key.startsWith("square.")||key.startsWith("circle.")||key.startsWith("dot.")||key.startsWith("swing.")||key.startsWith("walking-human.")) {
|
||||
index = 6;
|
||||
}
|
||||
|
||||
JPanel panel = null;
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -979,17 +1000,34 @@ public class ConfigWindow extends TWindow {
|
||||
case 5:
|
||||
panel = panelInsideScrollPaneTest;
|
||||
break;
|
||||
case 6:
|
||||
panel = panelInsideScrollPaneProgress;
|
||||
break;
|
||||
default:
|
||||
panel = panelInsideScrollPaneOther;
|
||||
}
|
||||
|
||||
if(index == 6 && !key.startsWith("test.") && !key.startsWith("square.") && key.endsWith(".visible") && !key.endsWith(".quarter-icon.visible")) {
|
||||
panel.add(Box.createRigidArea(new Dimension(5, 20)));
|
||||
}
|
||||
|
||||
if (jComponent instanceof JTextField) {
|
||||
JPanel p = new JPanel();
|
||||
//p.setLayout(null);
|
||||
|
||||
JLabel label = new JLabel(TimeCalcProperty.forKey(key).getDescription() + ": ");
|
||||
p.add(label);
|
||||
p.add(jComponent);
|
||||
label.setBounds(10, 0, 200, 25);
|
||||
if (label.getText().startsWith("Life")) {
|
||||
label.setText(label.getText().substring("Life".length() + 3));
|
||||
}
|
||||
if (label.getText().startsWith("Money")) {
|
||||
label.setText(label.getText().substring("Money".length() + 3));
|
||||
}
|
||||
if (label.getText().startsWith("Test")) {
|
||||
label.setText(label.getText().substring("Test".length() + 3));
|
||||
}
|
||||
|
||||
|
||||
jComponent.setBounds(220, 0, 200, 25);
|
||||
LayoutManager flowLayout = new FlowLayout(FlowLayout.LEFT);
|
||||
@ -1010,9 +1048,11 @@ public class ConfigWindow extends TWindow {
|
||||
|
||||
jComponent.setBounds(currentX[index], currentY[index], 200,
|
||||
HEIGHT1);
|
||||
panel.add(Box.createRigidArea(new Dimension(5, 5)));
|
||||
panel.add(Box.createRigidArea(new Dimension(5, 4)));
|
||||
|
||||
if (nextRow) {
|
||||
nextRow(index);
|
||||
|
||||
} else {
|
||||
currentX[index] = currentX[index] + SwingUtils.MARGIN + jComponent.getWidth();
|
||||
}
|
||||
|
@ -27,11 +27,11 @@ import org.nanoboot.utils.timecalc.swing.controls.TLabel;
|
||||
import org.nanoboot.utils.timecalc.swing.controls.TTextField;
|
||||
import org.nanoboot.utils.timecalc.swing.controls.TWindow;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.AnalogClock;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.DayBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.HourBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.MinuteBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.MonthBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.Battery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.DayBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.HourBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.MinuteBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.MonthBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.ProgressCircle;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.ProgressLife;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.ProgressMoney;
|
||||
@ -40,8 +40,8 @@ import org.nanoboot.utils.timecalc.swing.progress.ProgressSwing;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.weather.ProgressWeather;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.Time;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.WalkingHumanProgress;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.WeekBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.YearBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.WeekBattery;
|
||||
import org.nanoboot.utils.timecalc.swing.progress.battery.YearBattery;
|
||||
import org.nanoboot.utils.timecalc.utils.common.Constants;
|
||||
import org.nanoboot.utils.timecalc.utils.common.DateFormats;
|
||||
import org.nanoboot.utils.timecalc.utils.common.FileConstants;
|
||||
@ -682,8 +682,8 @@ public class MainWindow extends TWindow {
|
||||
.bindTo(timeCalcConfiguration.clockCircleBorderColorProperty);
|
||||
clock.handsColoredProperty
|
||||
.bindTo(timeCalcConfiguration.clockHandsColoredProperty);
|
||||
clock.centreCircleBlackProperty
|
||||
.bindTo(timeCalcConfiguration.clockCentreCircleBlackProperty);
|
||||
clock.centreCircleColoredProperty
|
||||
.bindTo(timeCalcConfiguration.clockCentreCircleColoredProperty);
|
||||
clock.progressVisibleOnlyIfMouseMovingOverProperty
|
||||
.bindTo(timeCalcConfiguration.clockProgressVisibleOnlyIfMouseMovingOverProperty);
|
||||
clock.dateVisibleOnlyIfMouseMovingOverProperty
|
||||
@ -893,7 +893,11 @@ public class MainWindow extends TWindow {
|
||||
|
||||
new Timer(100, e -> {
|
||||
IntegerProperty speed = timeCalcConfiguration.speedProperty;
|
||||
|
||||
if (speed.getValue() == Integer.MIN_VALUE) {
|
||||
timeCalcConfiguration.speedProperty.setValue(Integer.MAX_VALUE);
|
||||
}
|
||||
if (speed.getValue() == Integer.MAX_VALUE) {
|
||||
//timeCalcConfiguration.testEnabledProperty.setValue(false);
|
||||
if (timeCalcConfiguration.speedFloatingProperty.isEnabled()) {
|
||||
speed.setValue(0);
|
||||
@ -1437,7 +1441,7 @@ public class MainWindow extends TWindow {
|
||||
|
||||
public void increaseSpeed() {
|
||||
IntegerProperty speed = timeCalcConfiguration.speedProperty;
|
||||
if (speed.getValue() == Integer.MIN_VALUE) {
|
||||
if (speed.getValue() == Integer.MIN_VALUE || speed.getValue() == Integer.MAX_VALUE) {
|
||||
speed.setZero();
|
||||
}
|
||||
if (speed.getValue() == MAX_SPEED) {
|
||||
@ -1449,7 +1453,7 @@ public class MainWindow extends TWindow {
|
||||
|
||||
public void decreaseSpeed() {
|
||||
IntegerProperty speed = timeCalcConfiguration.speedProperty;
|
||||
if (speed.getValue() == Integer.MIN_VALUE) {
|
||||
if (speed.getValue() == Integer.MIN_VALUE || speed.getValue() == Integer.MAX_VALUE) {
|
||||
speed.setZero();
|
||||
}
|
||||
if (speed.getValue() == MIN_SPEED) {
|
||||
@ -1466,7 +1470,7 @@ public class MainWindow extends TWindow {
|
||||
}
|
||||
|
||||
public void resetSpeed() {
|
||||
timeCalcConfiguration.speedProperty.setValue(Integer.MIN_VALUE);
|
||||
timeCalcConfiguration.speedProperty.setValue(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
public void enableFloatingTime() {
|
||||
|
@ -3,23 +3,23 @@ visibility.supported.colored=true
|
||||
#
|
||||
clock.visible=true
|
||||
clock.hands.long.visible=true
|
||||
clock.centre-circle.black=false
|
||||
clock.centre-circle.colored=true
|
||||
clock.hands.hour.visible=true
|
||||
clock.hands.minute.visible=true
|
||||
clock.hands.second.visible=true
|
||||
clock.hands.millisecond.visible=false
|
||||
clock.border.visible=false
|
||||
clock.hands.millisecond.visible=true
|
||||
clock.border.visible=true
|
||||
clock.border.only-hours=false
|
||||
clock.numbers.visible=true
|
||||
clock.circle.visible=true
|
||||
clock.circle.strong-border=false
|
||||
clock.circle.border-color=0,0,0
|
||||
clock.circle.border-color=0,0,255
|
||||
clock.centre-circle.visible=true
|
||||
clock.hands.colored=true
|
||||
clock.progress.visible-only-if-mouse-moving-over=true
|
||||
clock.date.visible-only-if-mouse-moving-over=true
|
||||
clock.smiley.visible=false
|
||||
clock.percent-progress.visible=false
|
||||
clock.progress.visible-only-if-mouse-moving-over=false
|
||||
clock.date.visible-only-if-mouse-moving-over=false
|
||||
clock.smiley.visible=true
|
||||
clock.percent-progress.visible=true
|
||||
clock.circle-progress.visible=true
|
||||
clock.hidden=false
|
||||
#
|
||||
@ -50,7 +50,7 @@ jokes.visible=true
|
||||
commands.visible=true
|
||||
notifications.visible=true
|
||||
smileys.visible=true
|
||||
smileys.visible-only-if-mouse-moving-over=true
|
||||
smileys.visible-only-if-mouse-moving-over=false
|
||||
smileys.colored=true
|
||||
square.visible=true
|
||||
square.type=day
|
||||
@ -65,15 +65,15 @@ swing.visible=true
|
||||
swing.type=day
|
||||
swing.hidden=false
|
||||
swing.quarter-icon.visible=true
|
||||
life.visible=false
|
||||
life.visible=true
|
||||
life.type=day
|
||||
life.hidden=false
|
||||
life.birth-date=
|
||||
money.visible=false
|
||||
life.birth-date=2000-01-01
|
||||
money.visible=true
|
||||
money.type=day
|
||||
money.hidden=false
|
||||
money.per-month=0
|
||||
money.currency=
|
||||
money.per-month=1000000
|
||||
money.currency=$T
|
||||
weather.visible=true
|
||||
weather.hidden=false
|
||||
walking-human.visible=true
|
||||
|
Loading…
x
Reference in New Issue
Block a user