Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.class
*~
DEADJOE
*.jar
*.jar

target/**
GiftedMotion.iml
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 0 additions & 28 deletions build.xml

This file was deleted.

32 changes: 32 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>de.onysbits.giftedmotion</groupId>
<artifactId>GiftedMotion</artifactId>
<version>1.3-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*
*/

@SuppressWarnings("PointlessBitwiseExpression")
public class AnimatedGifEncoder {

protected int width; // image size
Expand Down Expand Up @@ -77,7 +78,6 @@ public void setDispose(int code) {
* image is added.
*
* @param iter int number of iterations.
* @return
*/
public void setRepeat(int iter) {
if (iter >= 0) {
Expand Down Expand Up @@ -198,7 +198,6 @@ public void setFrameRate(float fps) {
* than 20 do not yield significant improvements in speed.
*
* @param quality int greater than 0.
* @return
*/
public void setQuality(int quality) {
if (quality < 1) quality = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public static void openBrowser(String url) throws Exception {
*/
public static void decorateWindow(Window w) {
try {
ArrayList icolst = new ArrayList();
icolst.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-32x32.png")).getImage());
icolst.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-48x48.png")).getImage());
icolst.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-64x64.png")).getImage());
icolst.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-96x96.png")).getImage());
w.setIconImages(icolst);
var iconList = new ArrayList<Image>();
iconList.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-32x32.png")).getImage());
iconList.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-48x48.png")).getImage());
iconList.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-64x64.png")).getImage());
iconList.add(new ImageIcon(ClassLoader.getSystemResource("resources/logo-96x96.png")).getImage());
w.setIconImages(iconList);
}
catch (Throwable t) {
// Really don't care. Its just deco
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
*/
public class ColorIcon implements Icon {

private Color color;

private int width;
private int height;
private final Color color;
private final int width;
private final int height;

public ColorIcon(Color c, int w, int h) {
color=c;
Expand All @@ -24,16 +23,16 @@ public ColorIcon(Color c, int w, int h) {
public Color getColor() { return color;}

public void paintIcon(Component c, Graphics g, int x, int y) {
Color tmp = g.getColor();

if (color==null) {
Color tmp = g.getColor();
IO.createIcon("Tango/16x16/actions/process-stop.png","").paintIcon(c,g,x,y);
g.setColor(tmp);
}
else {
Color tmp = g.getColor();
g.setColor(color);
g.fillRect(x,y,width,height);
g.setColor(tmp);
}

g.setColor(tmp);
}
}
Loading