Remove top panel.
This commit is contained in:
		
							parent
							
								
									ca94ddf7ff
								
							
						
					
					
						commit
						26180b8d4d
					
				
					 2 changed files with 4 additions and 17 deletions
				
			
		|  | @ -167,19 +167,10 @@ public class MainWindow extends JFrame { | |||
|         this.add(mainPanel, BorderLayout.CENTER); | ||||
| 
 | ||||
|         // Top Panel | ||||
|         this.add(createTopPanel(), BorderLayout.NORTH); | ||||
|         this.add(createStatusBar(), BorderLayout.SOUTH); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     private void restartThreadTimer() { | ||||
|         threadTimer.restart(); | ||||
|     } | ||||
| 
 | ||||
|     private void stopThreadTimer() { | ||||
|         threadTimer.stop(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @param runnable | ||||
|      * @param canInterrupt | ||||
|  | @ -189,7 +180,7 @@ public class MainWindow extends JFrame { | |||
|             currentThread.setThread(new Thread(new Runnable() { | ||||
|                 @Override | ||||
|                 public void run() { | ||||
|                     restartThreadTimer(); | ||||
|                     threadTimer.restart(); | ||||
|                     threadPanel.setVisible(true); | ||||
|                     runnable.run(); | ||||
|                     clearCurrentThread(); | ||||
|  | @ -207,7 +198,7 @@ public class MainWindow extends JFrame { | |||
|     } | ||||
| 
 | ||||
|     protected void clearCurrentThread() { | ||||
|         stopThreadTimer(); | ||||
|         threadTimer.stop(); | ||||
|         threadPanel.setVisible(false); | ||||
|         currentThread.setThread(null); | ||||
|     } | ||||
|  | @ -521,12 +512,6 @@ public class MainWindow extends JFrame { | |||
|         return statusPanel; | ||||
|     } | ||||
| 
 | ||||
|     protected JPanel createTopPanel() { | ||||
|         JPanel topPanel = new JPanel(); | ||||
| 
 | ||||
|         return topPanel; | ||||
|     } | ||||
| 
 | ||||
|     public static void main(final String[] args) { | ||||
| 
 | ||||
|         // Try to set system look and feel. | ||||
|  |  | |||
|  | @ -6,6 +6,7 @@ import java.util.ArrayList; | |||
| import org.insa.graph.Point; | ||||
| import org.mapsforge.core.graphics.Canvas; | ||||
| import org.mapsforge.core.graphics.GraphicFactory; | ||||
| import org.mapsforge.core.graphics.Style; | ||||
| import org.mapsforge.core.model.BoundingBox; | ||||
| import org.mapsforge.core.model.LatLong; | ||||
| import org.mapsforge.map.awt.graphics.AwtGraphicFactory; | ||||
|  | @ -26,6 +27,7 @@ public class PolylineAutoScaling extends Polyline { | |||
|     public PolylineAutoScaling(int width, Color color) { | ||||
|         super(GRAPHIC_FACTORY.createPaint(), GRAPHIC_FACTORY); | ||||
|         getPaintStroke().setColor(PaintUtils.convertColor(color)); | ||||
|         getPaintStroke().setStyle(Style.STROKE); | ||||
|         this.width = width; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue