From a4e29ccdba3a3e4678c7c18f8f93fa36238a66c8 Mon Sep 17 00:00:00 2001 From: "J. Neugebauer" Date: Mon, 25 Jul 2022 17:38:53 +0200 Subject: [PATCH] Loader KLassen in io Paket verschoben --- src/main/java/schule/ngb/zm/Constants.java | 2 +- src/main/java/schule/ngb/zm/Zeichenmaschine.java | 2 +- src/main/java/schule/ngb/zm/layers/DrawingLayer.java | 2 +- src/main/java/schule/ngb/zm/layers/ImageLayer.java | 2 +- src/main/java/schule/ngb/zm/media/Music.java | 2 +- src/main/java/schule/ngb/zm/media/Sound.java | 3 +-- src/main/java/schule/ngb/zm/ml/NeuralNetwork.java | 2 +- src/main/java/schule/ngb/zm/shapes/Picture.java | 2 +- src/main/java/schule/ngb/zm/shapes/Text.java | 2 +- src/main/java/schule/ngb/zm/util/{ => io}/FileLoader.java | 4 +++- src/main/java/schule/ngb/zm/util/{ => io}/FontLoader.java | 4 +++- src/main/java/schule/ngb/zm/util/{ => io}/ImageLoader.java | 5 ++++- .../ngb/zm/util/{ => io}/ResourceStreamProvider.java | 7 +++---- src/test/java/schule/ngb/zm/util/FileLoaderTest.java | 1 + 14 files changed, 23 insertions(+), 17 deletions(-) rename src/main/java/schule/ngb/zm/util/{ => io}/FileLoader.java (97%) rename src/main/java/schule/ngb/zm/util/{ => io}/FontLoader.java (96%) rename src/main/java/schule/ngb/zm/util/{ => io}/ImageLoader.java (99%) rename src/main/java/schule/ngb/zm/util/{ => io}/ResourceStreamProvider.java (98%) diff --git a/src/main/java/schule/ngb/zm/Constants.java b/src/main/java/schule/ngb/zm/Constants.java index a6baee1..5b150cc 100644 --- a/src/main/java/schule/ngb/zm/Constants.java +++ b/src/main/java/schule/ngb/zm/Constants.java @@ -1,7 +1,7 @@ package schule.ngb.zm; import schule.ngb.zm.anim.Easing; -import schule.ngb.zm.util.ImageLoader; +import schule.ngb.zm.util.io.ImageLoader; import schule.ngb.zm.util.Noise; import java.awt.Cursor; diff --git a/src/main/java/schule/ngb/zm/Zeichenmaschine.java b/src/main/java/schule/ngb/zm/Zeichenmaschine.java index 1840329..c23995b 100644 --- a/src/main/java/schule/ngb/zm/Zeichenmaschine.java +++ b/src/main/java/schule/ngb/zm/Zeichenmaschine.java @@ -5,7 +5,7 @@ import schule.ngb.zm.layers.ColorLayer; import schule.ngb.zm.layers.DrawingLayer; import schule.ngb.zm.layers.ImageLayer; import schule.ngb.zm.layers.ShapesLayer; -import schule.ngb.zm.util.ImageLoader; +import schule.ngb.zm.util.io.ImageLoader; import schule.ngb.zm.util.Log; import schule.ngb.zm.util.tasks.TaskRunner; diff --git a/src/main/java/schule/ngb/zm/layers/DrawingLayer.java b/src/main/java/schule/ngb/zm/layers/DrawingLayer.java index 6fe6ef4..1b1f46f 100644 --- a/src/main/java/schule/ngb/zm/layers/DrawingLayer.java +++ b/src/main/java/schule/ngb/zm/layers/DrawingLayer.java @@ -2,7 +2,7 @@ package schule.ngb.zm.layers; import schule.ngb.zm.Layer; import schule.ngb.zm.Options; -import schule.ngb.zm.util.ImageLoader; +import schule.ngb.zm.util.io.ImageLoader; import java.awt.*; import java.awt.geom.*; diff --git a/src/main/java/schule/ngb/zm/layers/ImageLayer.java b/src/main/java/schule/ngb/zm/layers/ImageLayer.java index bb4eab4..a35c75d 100644 --- a/src/main/java/schule/ngb/zm/layers/ImageLayer.java +++ b/src/main/java/schule/ngb/zm/layers/ImageLayer.java @@ -4,7 +4,7 @@ import java.awt.Graphics2D; import java.awt.Image; import schule.ngb.zm.Layer; -import schule.ngb.zm.util.ImageLoader; +import schule.ngb.zm.util.io.ImageLoader; public class ImageLayer extends Layer { diff --git a/src/main/java/schule/ngb/zm/media/Music.java b/src/main/java/schule/ngb/zm/media/Music.java index c702143..d6d3813 100644 --- a/src/main/java/schule/ngb/zm/media/Music.java +++ b/src/main/java/schule/ngb/zm/media/Music.java @@ -3,7 +3,7 @@ package schule.ngb.zm.media; import schule.ngb.zm.util.events.EventDispatcher; import schule.ngb.zm.util.tasks.TaskRunner; import schule.ngb.zm.util.Log; -import schule.ngb.zm.util.ResourceStreamProvider; +import schule.ngb.zm.util.io.ResourceStreamProvider; import schule.ngb.zm.util.Validator; import javax.sound.sampled.*; diff --git a/src/main/java/schule/ngb/zm/media/Sound.java b/src/main/java/schule/ngb/zm/media/Sound.java index d1955c6..61dc4a8 100644 --- a/src/main/java/schule/ngb/zm/media/Sound.java +++ b/src/main/java/schule/ngb/zm/media/Sound.java @@ -1,12 +1,11 @@ package schule.ngb.zm.media; import schule.ngb.zm.util.Log; -import schule.ngb.zm.util.ResourceStreamProvider; +import schule.ngb.zm.util.io.ResourceStreamProvider; import schule.ngb.zm.util.Validator; import javax.sound.sampled.*; import java.io.IOException; -import java.io.InputStream; import java.net.URL; /** diff --git a/src/main/java/schule/ngb/zm/ml/NeuralNetwork.java b/src/main/java/schule/ngb/zm/ml/NeuralNetwork.java index 6babdab..debf654 100644 --- a/src/main/java/schule/ngb/zm/ml/NeuralNetwork.java +++ b/src/main/java/schule/ngb/zm/ml/NeuralNetwork.java @@ -1,7 +1,7 @@ package schule.ngb.zm.ml; import schule.ngb.zm.util.Log; -import schule.ngb.zm.util.ResourceStreamProvider; +import schule.ngb.zm.util.io.ResourceStreamProvider; import java.io.*; import java.util.LinkedList; diff --git a/src/main/java/schule/ngb/zm/shapes/Picture.java b/src/main/java/schule/ngb/zm/shapes/Picture.java index 5141817..45473f4 100644 --- a/src/main/java/schule/ngb/zm/shapes/Picture.java +++ b/src/main/java/schule/ngb/zm/shapes/Picture.java @@ -3,7 +3,7 @@ package schule.ngb.zm.shapes; import schule.ngb.zm.Color; import schule.ngb.zm.Options; -import schule.ngb.zm.util.ImageLoader; +import schule.ngb.zm.util.io.ImageLoader; import java.awt.*; import java.awt.geom.AffineTransform; diff --git a/src/main/java/schule/ngb/zm/shapes/Text.java b/src/main/java/schule/ngb/zm/shapes/Text.java index e03da58..bee1fd0 100644 --- a/src/main/java/schule/ngb/zm/shapes/Text.java +++ b/src/main/java/schule/ngb/zm/shapes/Text.java @@ -2,7 +2,7 @@ package schule.ngb.zm.shapes; import schule.ngb.zm.Color; import schule.ngb.zm.Options; -import schule.ngb.zm.util.FontLoader; +import schule.ngb.zm.util.io.FontLoader; import java.awt.Canvas; import java.awt.Font; diff --git a/src/main/java/schule/ngb/zm/util/FileLoader.java b/src/main/java/schule/ngb/zm/util/io/FileLoader.java similarity index 97% rename from src/main/java/schule/ngb/zm/util/FileLoader.java rename to src/main/java/schule/ngb/zm/util/io/FileLoader.java index 2d90259..23af12c 100644 --- a/src/main/java/schule/ngb/zm/util/FileLoader.java +++ b/src/main/java/schule/ngb/zm/util/io/FileLoader.java @@ -1,4 +1,6 @@ -package schule.ngb.zm.util; +package schule.ngb.zm.util.io; + +import schule.ngb.zm.util.Log; import java.io.IOException; import java.net.URISyntaxException; diff --git a/src/main/java/schule/ngb/zm/util/FontLoader.java b/src/main/java/schule/ngb/zm/util/io/FontLoader.java similarity index 96% rename from src/main/java/schule/ngb/zm/util/FontLoader.java rename to src/main/java/schule/ngb/zm/util/io/FontLoader.java index 7b85553..1971f70 100644 --- a/src/main/java/schule/ngb/zm/util/FontLoader.java +++ b/src/main/java/schule/ngb/zm/util/io/FontLoader.java @@ -1,4 +1,6 @@ -package schule.ngb.zm.util; +package schule.ngb.zm.util.io; + +import schule.ngb.zm.util.Log; import java.awt.Font; import java.awt.FontFormatException; diff --git a/src/main/java/schule/ngb/zm/util/ImageLoader.java b/src/main/java/schule/ngb/zm/util/io/ImageLoader.java similarity index 99% rename from src/main/java/schule/ngb/zm/util/ImageLoader.java rename to src/main/java/schule/ngb/zm/util/io/ImageLoader.java index cef8257..8a97b27 100644 --- a/src/main/java/schule/ngb/zm/util/ImageLoader.java +++ b/src/main/java/schule/ngb/zm/util/io/ImageLoader.java @@ -1,4 +1,7 @@ -package schule.ngb.zm.util; +package schule.ngb.zm.util.io; + +import schule.ngb.zm.util.Log; +import schule.ngb.zm.util.Validator; import javax.imageio.ImageIO; import java.awt.Color; diff --git a/src/main/java/schule/ngb/zm/util/ResourceStreamProvider.java b/src/main/java/schule/ngb/zm/util/io/ResourceStreamProvider.java similarity index 98% rename from src/main/java/schule/ngb/zm/util/ResourceStreamProvider.java rename to src/main/java/schule/ngb/zm/util/io/ResourceStreamProvider.java index 212cdbe..1f892dc 100644 --- a/src/main/java/schule/ngb/zm/util/ResourceStreamProvider.java +++ b/src/main/java/schule/ngb/zm/util/io/ResourceStreamProvider.java @@ -1,12 +1,11 @@ -package schule.ngb.zm.util; +package schule.ngb.zm.util.io; import schule.ngb.zm.Zeichenmaschine; +import schule.ngb.zm.util.Log; +import schule.ngb.zm.util.Validator; import java.io.*; -import java.net.URISyntaxException; import java.net.URL; -import java.nio.file.Files; -import java.util.stream.StreamSupport; /** * Helferklasse, um {@link InputStream}s für Resourcen zu erhalten. diff --git a/src/test/java/schule/ngb/zm/util/FileLoaderTest.java b/src/test/java/schule/ngb/zm/util/FileLoaderTest.java index 8fcd5d2..7473964 100644 --- a/src/test/java/schule/ngb/zm/util/FileLoaderTest.java +++ b/src/test/java/schule/ngb/zm/util/FileLoaderTest.java @@ -1,6 +1,7 @@ package schule.ngb.zm.util; import org.junit.jupiter.api.Test; +import schule.ngb.zm.util.io.FileLoader; import java.util.List;