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.GraphReader;
import org.insa.graph.io.MapMismatchException; import org.insa.graph.io.MapMismatchException;
import org.insa.graphics.ShortestPathPanel.StartActionEvent; import org.insa.graphics.ShortestPathPanel.StartActionEvent;
import org.insa.graphics.drawing.BasicDrawing;
import org.insa.graphics.drawing.BasicGraphPalette; import org.insa.graphics.drawing.BasicGraphPalette;
import org.insa.graphics.drawing.BlackAndWhiteGraphPalette; import org.insa.graphics.drawing.BlackAndWhiteGraphPalette;
import org.insa.graphics.drawing.Drawing; import org.insa.graphics.drawing.Drawing;
import org.insa.graphics.drawing.GraphPalette; 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 { 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.BasicStroke;
import java.awt.Color; import java.awt.Color;
@ -25,6 +25,10 @@ import org.insa.graph.Graph;
import org.insa.graph.Node; import org.insa.graph.Node;
import org.insa.graph.Path; import org.insa.graph.Path;
import org.insa.graph.Point; 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.MarkerOverlay;
import org.insa.graphics.drawing.overlays.MarkerUtils; import org.insa.graphics.drawing.overlays.MarkerUtils;
import org.insa.graphics.drawing.overlays.Overlay; 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.awt.Color;
import java.io.File; import java.io.File;
@ -9,6 +9,9 @@ import org.insa.graph.Arc;
import org.insa.graph.Graph; import org.insa.graph.Graph;
import org.insa.graph.Path; import org.insa.graph.Path;
import org.insa.graph.Point; 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.MarkerOverlay;
import org.insa.graphics.drawing.overlays.MarkerUtils; import org.insa.graphics.drawing.overlays.MarkerUtils;
import org.insa.graphics.drawing.overlays.Overlay; import org.insa.graphics.drawing.overlays.Overlay;
@ -213,6 +216,9 @@ public class MapViewDrawing extends MapView implements Drawing {
DisplayModel model = getModel().displayModel; DisplayModel model = getModel().displayModel;
this.tileSize = DEFAULT_TILE_SIZE; this.tileSize = DEFAULT_TILE_SIZE;
model.setFixedTileSize(this.tileSize); model.setFixedTileSize(this.tileSize);
this.setZoomLevelMin((byte) 0);
this.setZoomLevelMax((byte) 20);
} }
protected LatLong convertPoint(Point point) { 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.*;
import java.awt.event.*; import java.awt.event.*;