mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added new improvements
This commit is contained in:
parent
c260044cb4
commit
20dfd0068f
@ -146,4 +146,8 @@ public class Battery extends Widget {
|
|||||||
public void setLabel(String label) {
|
public void setLabel(String label) {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBounds(int x, int y, int height) {
|
||||||
|
setBounds(x, y, (int) (90d / 140d * height), height);
|
||||||
|
}
|
||||||
}
|
}
|
@ -281,14 +281,13 @@ public class TimeCalcManager {
|
|||||||
|
|
||||||
Battery batteryForDay = new Battery();
|
Battery batteryForDay = new Battery();
|
||||||
batteryForDay.setBounds(progressCircle.getBounds().x,
|
batteryForDay.setBounds(progressCircle.getBounds().x,
|
||||||
progressCircle.getY() + MARGIN + progressCircle.getHeight(), 90,
|
progressCircle.getY() + MARGIN + progressCircle.getHeight(), 140);
|
||||||
140);
|
|
||||||
window.add(batteryForDay);
|
window.add(batteryForDay);
|
||||||
|
|
||||||
Battery batteryForWeek = new Battery();
|
Battery batteryForWeek = new Battery();
|
||||||
batteryForWeek.setBounds(
|
batteryForWeek.setBounds(
|
||||||
batteryForDay.getBounds().x + batteryForDay.getWidth(),
|
batteryForDay.getBounds().x + batteryForDay.getWidth(),
|
||||||
batteryForDay.getY(), 90, 140);
|
batteryForDay.getY(), 140);
|
||||||
window.add(batteryForWeek);
|
window.add(batteryForWeek);
|
||||||
|
|
||||||
Calendar calNow = Calendar.getInstance();
|
Calendar calNow = Calendar.getInstance();
|
||||||
@ -331,14 +330,12 @@ public class TimeCalcManager {
|
|||||||
Battery batteryForMonth = new Battery();
|
Battery batteryForMonth = new Battery();
|
||||||
batteryForMonth.setBounds(
|
batteryForMonth.setBounds(
|
||||||
batteryForDay.getBounds().x + batteryForDay.getWidth(),
|
batteryForDay.getBounds().x + batteryForDay.getWidth(),
|
||||||
batteryForDay.getY() + batteryForWeek.getHeight() + MARGIN, 90,
|
batteryForDay.getY() + batteryForWeek.getHeight() + MARGIN, 140);
|
||||||
140);
|
|
||||||
window.add(batteryForMonth);
|
window.add(batteryForMonth);
|
||||||
|
|
||||||
Battery batteryForHour = new Battery();
|
Battery batteryForHour = new Battery();
|
||||||
batteryForHour.setBounds(batteryForMonth.getBounds().x,
|
batteryForHour.setBounds(batteryForMonth.getBounds().x,
|
||||||
batteryForMonth.getY() + batteryForMonth.getHeight() + MARGIN,
|
batteryForMonth.getY() + batteryForMonth.getHeight() + MARGIN, 140);
|
||||||
90, 140);
|
|
||||||
window.add(batteryForHour);
|
window.add(batteryForHour);
|
||||||
Rectangle hourRectangle = batteryForHour.getBounds();
|
Rectangle hourRectangle = batteryForHour.getBounds();
|
||||||
Rectangle dayRectangle = batteryForDay.getBounds();
|
Rectangle dayRectangle = batteryForDay.getBounds();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user