Remove top panel.

This commit is contained in:
Holt59 2018-02-24 20:50:16 +01:00
parent ca94ddf7ff
commit 26180b8d4d
2 changed files with 4 additions and 17 deletions

View File

@ -167,19 +167,10 @@ public class MainWindow extends JFrame {
this.add(mainPanel, BorderLayout.CENTER); this.add(mainPanel, BorderLayout.CENTER);
// Top Panel // Top Panel
this.add(createTopPanel(), BorderLayout.NORTH);
this.add(createStatusBar(), BorderLayout.SOUTH); this.add(createStatusBar(), BorderLayout.SOUTH);
} }
private void restartThreadTimer() {
threadTimer.restart();
}
private void stopThreadTimer() {
threadTimer.stop();
}
/** /**
* @param runnable * @param runnable
* @param canInterrupt * @param canInterrupt
@ -189,7 +180,7 @@ public class MainWindow extends JFrame {
currentThread.setThread(new Thread(new Runnable() { currentThread.setThread(new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
restartThreadTimer(); threadTimer.restart();
threadPanel.setVisible(true); threadPanel.setVisible(true);
runnable.run(); runnable.run();
clearCurrentThread(); clearCurrentThread();
@ -207,7 +198,7 @@ public class MainWindow extends JFrame {
} }
protected void clearCurrentThread() { protected void clearCurrentThread() {
stopThreadTimer(); threadTimer.stop();
threadPanel.setVisible(false); threadPanel.setVisible(false);
currentThread.setThread(null); currentThread.setThread(null);
} }
@ -521,12 +512,6 @@ public class MainWindow extends JFrame {
return statusPanel; return statusPanel;
} }
protected JPanel createTopPanel() {
JPanel topPanel = new JPanel();
return topPanel;
}
public static void main(final String[] args) { public static void main(final String[] args) {
// Try to set system look and feel. // Try to set system look and feel.

View File

@ -6,6 +6,7 @@ import java.util.ArrayList;
import org.insa.graph.Point; import org.insa.graph.Point;
import org.mapsforge.core.graphics.Canvas; import org.mapsforge.core.graphics.Canvas;
import org.mapsforge.core.graphics.GraphicFactory; import org.mapsforge.core.graphics.GraphicFactory;
import org.mapsforge.core.graphics.Style;
import org.mapsforge.core.model.BoundingBox; import org.mapsforge.core.model.BoundingBox;
import org.mapsforge.core.model.LatLong; import org.mapsforge.core.model.LatLong;
import org.mapsforge.map.awt.graphics.AwtGraphicFactory; import org.mapsforge.map.awt.graphics.AwtGraphicFactory;
@ -26,6 +27,7 @@ public class PolylineAutoScaling extends Polyline {
public PolylineAutoScaling(int width, Color color) { public PolylineAutoScaling(int width, Color color) {
super(GRAPHIC_FACTORY.createPaint(), GRAPHIC_FACTORY); super(GRAPHIC_FACTORY.createPaint(), GRAPHIC_FACTORY);
getPaintStroke().setColor(PaintUtils.convertColor(color)); getPaintStroke().setColor(PaintUtils.convertColor(color));
getPaintStroke().setStyle(Style.STROKE);
this.width = width; this.width = width;
} }