Reorganize code.

This commit is contained in:
Holt59 2018-03-03 13:43:03 +01:00
parent bc70c4267d
commit 7827bfc63c
4 changed files with 15 additions and 5 deletions

View file

@ -59,12 +59,12 @@ import org.insa.graph.io.BinaryPathReader;
import org.insa.graph.io.GraphReader;
import org.insa.graph.io.MapMismatchException;
import org.insa.graphics.ShortestPathPanel.StartActionEvent;
import org.insa.graphics.drawing.BasicDrawing;
import org.insa.graphics.drawing.BasicGraphPalette;
import org.insa.graphics.drawing.BlackAndWhiteGraphPalette;
import org.insa.graphics.drawing.Drawing;
import org.insa.graphics.drawing.GraphPalette;
import org.insa.graphics.drawing.MapViewDrawing;
import org.insa.graphics.drawing.components.BasicDrawing;
import org.insa.graphics.drawing.components.MapViewDrawing;
public class MainWindow extends JFrame {

View file

@ -1,4 +1,4 @@
package org.insa.graphics.drawing;
package org.insa.graphics.drawing.components;
import java.awt.BasicStroke;
import java.awt.Color;
@ -25,6 +25,10 @@ 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.BasicGraphPalette;
import org.insa.graphics.drawing.Drawing;
import org.insa.graphics.drawing.DrawingClickListener;
import org.insa.graphics.drawing.GraphPalette;
import org.insa.graphics.drawing.overlays.MarkerOverlay;
import org.insa.graphics.drawing.overlays.MarkerUtils;
import org.insa.graphics.drawing.overlays.Overlay;

View file

@ -1,4 +1,4 @@
package org.insa.graphics.drawing;
package org.insa.graphics.drawing.components;
import java.awt.Color;
import java.io.File;
@ -9,6 +9,9 @@ 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.Drawing;
import org.insa.graphics.drawing.DrawingClickListener;
import org.insa.graphics.drawing.GraphPalette;
import org.insa.graphics.drawing.overlays.MarkerOverlay;
import org.insa.graphics.drawing.overlays.MarkerUtils;
import org.insa.graphics.drawing.overlays.Overlay;
@ -213,6 +216,9 @@ public class MapViewDrawing extends MapView implements Drawing {
DisplayModel model = getModel().displayModel;
this.tileSize = DEFAULT_TILE_SIZE;
model.setFixedTileSize(this.tileSize);
this.setZoomLevelMin((byte) 0);
this.setZoomLevelMax((byte) 20);
}
protected LatLong convertPoint(Point point) {

View file

@ -1,4 +1,4 @@
package org.insa.graphics.drawing;
package org.insa.graphics.drawing.components;
import java.awt.*;
import java.awt.event.*;