Added new improvements

This commit is contained in:
Robert Vokac 2024-01-28 14:30:03 +00:00
parent da901e30e1
commit d3dcab759c
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
3 changed files with 34 additions and 3393 deletions

File diff suppressed because it is too large Load Diff

View File

@ -115,7 +115,7 @@ public class Battery extends JPanel {
intX + width_ / pointCount * 4,
intX + width_ / pointCount * 5,
intX + width_ / pointCount * 6,
(int) (intX + width_ / pointCount * 7.9),
(int) (intX + width_ / pointCount * 7),
intX + width_ / pointCount * 8},
new int[]{(int) (todoHeight + (waterSurfaceHeight * 1)),
todoHeight + (int) (waterSurfaceHeight * getRandom(0)),

View File

@ -7,6 +7,8 @@ import javax.swing.JFrame;
import javax.swing.JTextPane;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.text.DecimalFormat;
@ -89,6 +91,36 @@ public class TimeCalcWindow {
text.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
text.setForeground(Color.GRAY);
text.setBackground(new Color(238, 238, 238));
text.putClientProperty("mouseEntered", "false");
text.addMouseListener(new MouseListener() {
@Override
public void mouseClicked(MouseEvent e) {
Utils.highlighted.flip();
}
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {
}
@Override
public void mouseEntered(MouseEvent e) {
text.putClientProperty("mouseEntered", "true");
}
@Override
public void mouseExited(MouseEvent e) {
text.putClientProperty("mouseEntered", "false");
}
});
window.add(text);
weatherButton
.setBounds(20, text.getY() + text.getHeight() + 10, 100, 30);
@ -275,7 +307,7 @@ public class TimeCalcWindow {
}
text.setForeground(
Utils.highlighted.get() ? Color.BLACK : Color.LIGHT_GRAY);
Utils.highlighted.get() || text.getClientProperty("mouseEntered").equals("true") ? Color.BLACK : Color.LIGHT_GRAY);
}
window.setVisible(false);
window.dispose();