From 467253f9bbd6832de6809f283871541cd0db4f17 Mon Sep 17 00:00:00 2001 From: Holt59 Date: Sun, 25 Feb 2018 18:13:22 +0100 Subject: [PATCH] Re-organize code. --- src/main/org/insa/graphics/NodesInputPanel.java | 2 +- src/main/org/insa/graphics/drawing/BasicDrawing.java | 4 +++- src/main/org/insa/graphics/drawing/Drawing.java | 1 + src/main/org/insa/graphics/drawing/MapViewDrawing.java | 6 ++++-- .../insa/graphics/drawing/{ => overlays}/MarkerTracker.java | 2 +- .../graphics/drawing/{utils => overlays}/MarkerUtils.java | 2 +- .../graphics/drawing/{ => overlays}/OverlayTracker.java | 2 +- .../graphics/drawing/{utils => overlays}/PaintUtils.java | 2 +- .../drawing/{utils => overlays}/PolylineAutoScaling.java | 2 +- 9 files changed, 14 insertions(+), 9 deletions(-) rename src/main/org/insa/graphics/drawing/{ => overlays}/MarkerTracker.java (85%) rename src/main/org/insa/graphics/drawing/{utils => overlays}/MarkerUtils.java (97%) rename src/main/org/insa/graphics/drawing/{ => overlays}/OverlayTracker.java (87%) rename src/main/org/insa/graphics/drawing/{utils => overlays}/PaintUtils.java (94%) rename src/main/org/insa/graphics/drawing/{utils => overlays}/PolylineAutoScaling.java (97%) diff --git a/src/main/org/insa/graphics/NodesInputPanel.java b/src/main/org/insa/graphics/NodesInputPanel.java index 70335e5..3de18d0 100644 --- a/src/main/org/insa/graphics/NodesInputPanel.java +++ b/src/main/org/insa/graphics/NodesInputPanel.java @@ -26,7 +26,7 @@ import org.insa.graph.Node; import org.insa.graph.Point; import org.insa.graphics.drawing.Drawing; import org.insa.graphics.drawing.DrawingClickListener; -import org.insa.graphics.drawing.MarkerTracker; +import org.insa.graphics.drawing.overlays.MarkerTracker; public class NodesInputPanel extends JPanel implements DrawingClickListener { diff --git a/src/main/org/insa/graphics/drawing/BasicDrawing.java b/src/main/org/insa/graphics/drawing/BasicDrawing.java index 4d52b62..2ce8844 100644 --- a/src/main/org/insa/graphics/drawing/BasicDrawing.java +++ b/src/main/org/insa/graphics/drawing/BasicDrawing.java @@ -24,7 +24,9 @@ import org.insa.graph.Graph; import org.insa.graph.Node; import org.insa.graph.Path; import org.insa.graph.Point; -import org.insa.graphics.drawing.utils.MarkerUtils; +import org.insa.graphics.drawing.overlays.MarkerTracker; +import org.insa.graphics.drawing.overlays.MarkerUtils; +import org.insa.graphics.drawing.overlays.OverlayTracker; /** * Cette implementation de la classe Dessin produit vraiment un affichage (au diff --git a/src/main/org/insa/graphics/drawing/Drawing.java b/src/main/org/insa/graphics/drawing/Drawing.java index 45dc04b..3d788b2 100644 --- a/src/main/org/insa/graphics/drawing/Drawing.java +++ b/src/main/org/insa/graphics/drawing/Drawing.java @@ -5,6 +5,7 @@ import java.awt.Color; import org.insa.graph.Graph; import org.insa.graph.Path; import org.insa.graph.Point; +import org.insa.graphics.drawing.overlays.MarkerTracker; public interface Drawing { diff --git a/src/main/org/insa/graphics/drawing/MapViewDrawing.java b/src/main/org/insa/graphics/drawing/MapViewDrawing.java index ac894e8..3952db4 100644 --- a/src/main/org/insa/graphics/drawing/MapViewDrawing.java +++ b/src/main/org/insa/graphics/drawing/MapViewDrawing.java @@ -14,8 +14,10 @@ import org.insa.graph.Arc; import org.insa.graph.Graph; import org.insa.graph.Path; import org.insa.graph.Point; -import org.insa.graphics.drawing.utils.MarkerUtils; -import org.insa.graphics.drawing.utils.PolylineAutoScaling; +import org.insa.graphics.drawing.overlays.MarkerTracker; +import org.insa.graphics.drawing.overlays.MarkerUtils; +import org.insa.graphics.drawing.overlays.OverlayTracker; +import org.insa.graphics.drawing.overlays.PolylineAutoScaling; import org.mapsforge.core.graphics.Bitmap; import org.mapsforge.core.graphics.GraphicFactory; import org.mapsforge.core.model.BoundingBox; diff --git a/src/main/org/insa/graphics/drawing/MarkerTracker.java b/src/main/org/insa/graphics/drawing/overlays/MarkerTracker.java similarity index 85% rename from src/main/org/insa/graphics/drawing/MarkerTracker.java rename to src/main/org/insa/graphics/drawing/overlays/MarkerTracker.java index c1f3daf..82b43db 100644 --- a/src/main/org/insa/graphics/drawing/MarkerTracker.java +++ b/src/main/org/insa/graphics/drawing/overlays/MarkerTracker.java @@ -1,4 +1,4 @@ -package org.insa.graphics.drawing; +package org.insa.graphics.drawing.overlays; import org.insa.graph.Point; diff --git a/src/main/org/insa/graphics/drawing/utils/MarkerUtils.java b/src/main/org/insa/graphics/drawing/overlays/MarkerUtils.java similarity index 97% rename from src/main/org/insa/graphics/drawing/utils/MarkerUtils.java rename to src/main/org/insa/graphics/drawing/overlays/MarkerUtils.java index 4571961..a9916bd 100644 --- a/src/main/org/insa/graphics/drawing/utils/MarkerUtils.java +++ b/src/main/org/insa/graphics/drawing/overlays/MarkerUtils.java @@ -1,4 +1,4 @@ -package org.insa.graphics.drawing.utils; +package org.insa.graphics.drawing.overlays; import java.awt.Color; import java.awt.image.BufferedImage; diff --git a/src/main/org/insa/graphics/drawing/OverlayTracker.java b/src/main/org/insa/graphics/drawing/overlays/OverlayTracker.java similarity index 87% rename from src/main/org/insa/graphics/drawing/OverlayTracker.java rename to src/main/org/insa/graphics/drawing/overlays/OverlayTracker.java index f0af951..4c150da 100644 --- a/src/main/org/insa/graphics/drawing/OverlayTracker.java +++ b/src/main/org/insa/graphics/drawing/overlays/OverlayTracker.java @@ -1,4 +1,4 @@ -package org.insa.graphics.drawing; +package org.insa.graphics.drawing.overlays; public interface OverlayTracker { diff --git a/src/main/org/insa/graphics/drawing/utils/PaintUtils.java b/src/main/org/insa/graphics/drawing/overlays/PaintUtils.java similarity index 94% rename from src/main/org/insa/graphics/drawing/utils/PaintUtils.java rename to src/main/org/insa/graphics/drawing/overlays/PaintUtils.java index 8c024cf..3056bbe 100644 --- a/src/main/org/insa/graphics/drawing/utils/PaintUtils.java +++ b/src/main/org/insa/graphics/drawing/overlays/PaintUtils.java @@ -1,4 +1,4 @@ -package org.insa.graphics.drawing.utils; +package org.insa.graphics.drawing.overlays; import java.awt.Color; diff --git a/src/main/org/insa/graphics/drawing/utils/PolylineAutoScaling.java b/src/main/org/insa/graphics/drawing/overlays/PolylineAutoScaling.java similarity index 97% rename from src/main/org/insa/graphics/drawing/utils/PolylineAutoScaling.java rename to src/main/org/insa/graphics/drawing/overlays/PolylineAutoScaling.java index 262ad94..15d2427 100644 --- a/src/main/org/insa/graphics/drawing/utils/PolylineAutoScaling.java +++ b/src/main/org/insa/graphics/drawing/overlays/PolylineAutoScaling.java @@ -1,4 +1,4 @@ -package org.insa.graphics.drawing.utils; +package org.insa.graphics.drawing.overlays; import java.awt.Color; import java.util.List;