Skip to content

Commit dc743db

Browse files
committed
Initial Commit
1 parent 1e1df93 commit dc743db

11 files changed

+55
-11
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@
2121

2222
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2323
hs_err_pid*
24+
25+
*.classpath
26+
*.project
27+
*.settings
28+
*target/*

pom.xml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>de.dortmunddev</groupId>
6+
<artifactId>SnowDesktop</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
9+
<build>
10+
<sourceDirectory>src</sourceDirectory>
11+
<resources>
12+
<resource>
13+
<directory>src</directory>
14+
<excludes>
15+
<exclude>**/*.java</exclude>
16+
</excludes>
17+
</resource>
18+
</resources>
19+
<plugins>
20+
<plugin>
21+
<artifactId>maven-compiler-plugin</artifactId>
22+
<version>3.8.1</version>
23+
<configuration>
24+
<source>11</source>
25+
<target>11</target>
26+
</configuration>
27+
</plugin>
28+
</plugins>
29+
</build>
30+
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>net.java.dev.jna</groupId>
35+
<artifactId>jna</artifactId>
36+
<version>5.6.0</version>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>net.java.dev.jna</groupId>
41+
<artifactId>jna-platform</artifactId>
42+
<version>5.6.0</version>
43+
</dependency>
44+
45+
</dependencies>
46+
47+
</project>

src/data/SnowSimulator.java src/main/java/data/SnowSimulator.java

-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public void start() {
103103

104104
final Thread windowUpdater = new Thread(new Runnable() {
105105

106-
@Override
107106
public void run() {
108107
try {
109108
SnowSimulator.this.getAllWindows();
@@ -135,7 +134,6 @@ public void getAllWindows() throws InterruptedException {
135134
}
136135

137136
User32.EnumWindows(new WNDENUMPROC() {
138-
@Override
139137
public boolean callback(final HWND arg0, final Pointer arg1) {
140138
final byte[] buffer = new byte[1024];
141139
User32.GetWindowTextA(arg0, buffer, buffer.length);
File renamed without changes.

src/snowdesktop/TrayIconCustom.java src/main/java/snowdesktop/TrayIconCustom.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public TrayIconCustom() {
2828
}
2929

3030
// Create a tray icon with the menus: Schneestärke and exit;
31-
// Schneestärke has the submenus: leicht, mittel and stark, which define the amount of snow, that will fall
31+
// Schneestärke has the submenus: leicht, mittel and stark, which define the
32+
// amount of snow, that will fall
3233
// exit will exit the program
3334
public void setTrayIcon() {
3435
if (SystemTray.isSupported()) {
@@ -49,8 +50,7 @@ public void setTrayIcon() {
4950

5051
cbLow.addItemListener(new ItemListener() {
5152

52-
@Override
53-
public void itemStateChanged(final ItemEvent e) {
53+
public void itemStateChanged(ItemEvent e) {
5454
cbMid.setState(false);
5555
cbHigh.setState(false);
5656
cbOff.setState(false);
@@ -60,7 +60,6 @@ public void itemStateChanged(final ItemEvent e) {
6060

6161
cbMid.addItemListener(new ItemListener() {
6262

63-
@Override
6463
public void itemStateChanged(final ItemEvent e) {
6564
cbLow.setState(false);
6665
cbHigh.setState(false);
@@ -71,7 +70,6 @@ public void itemStateChanged(final ItemEvent e) {
7170

7271
cbHigh.addItemListener(new ItemListener() {
7372

74-
@Override
7573
public void itemStateChanged(final ItemEvent e) {
7674
cbLow.setState(false);
7775
cbMid.setState(false);
@@ -82,7 +80,6 @@ public void itemStateChanged(final ItemEvent e) {
8280

8381
cbOff.addItemListener(new ItemListener() {
8482

85-
@Override
8683
public void itemStateChanged(final ItemEvent e) {
8784
cbLow.setState(false);
8885
cbMid.setState(false);
@@ -94,7 +91,6 @@ public void itemStateChanged(final ItemEvent e) {
9491
final MenuItem exitItem = new MenuItem("Exit");
9592
exitItem.addActionListener(new ActionListener() {
9693

97-
@Override
9894
public void actionPerformed(final ActionEvent e) {
9995
System.exit(0);
10096
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/visual/SnowflakePanel.java src/main/java/visual/SnowflakePanel.java

-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public SnowflakePanel(final RECT currentScreenRect) {
5858
// This thread generates new snowflakes
5959
final Thread snowflakeGenerationThread = new Thread(new Runnable() {
6060

61-
@Override
6261
public void run() {
6362
while (true) {
6463
try {
@@ -75,7 +74,6 @@ public void run() {
7574
// This timer is used to repaint this panel every 10 ms and show the snowflakes
7675
final Timer swingAnimator = new Timer(10, new ActionListener() {
7776

78-
@Override
7977
public void actionPerformed(final ActionEvent e) {
8078
try {
8179
SnowflakePanel.this.updateSnowflakes();

src/snowflake.png

-3.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)