|
@@ -4,7 +4,9 @@ import gui.menubar.MenuBar;
|
|
|
import gui.panels.agenda.AgendaPane;
|
|
import gui.panels.agenda.AgendaPane;
|
|
|
import gui.panels.edit.EditPane;
|
|
import gui.panels.edit.EditPane;
|
|
|
import gui.panels.table.Table;
|
|
import gui.panels.table.Table;
|
|
|
|
|
+import gui.simulator.SimulatorPane;
|
|
|
|
|
|
|
|
|
|
+import java.awt.BorderLayout;
|
|
|
import java.awt.Color;
|
|
import java.awt.Color;
|
|
|
import java.awt.Window;
|
|
import java.awt.Window;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
@@ -14,7 +16,6 @@ import javax.swing.JFrame;
|
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JPanel;
|
|
|
|
|
|
|
|
import agenda.Agenda;
|
|
import agenda.Agenda;
|
|
|
-import gui.simulator.SimulatorPane;
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
@SuppressWarnings("serial")
|
|
|
public class MainFrame extends JFrame{
|
|
public class MainFrame extends JFrame{
|
|
@@ -25,13 +26,13 @@ public class MainFrame extends JFrame{
|
|
|
private JPanel currentPanel;
|
|
private JPanel currentPanel;
|
|
|
|
|
|
|
|
private int length;
|
|
private int length;
|
|
|
- private int width;
|
|
|
|
|
|
|
+ private int terainwidth;
|
|
|
private SimulatorPane.Terrains terrain;
|
|
private SimulatorPane.Terrains terrain;
|
|
|
|
|
|
|
|
public MainFrame(){
|
|
public MainFrame(){
|
|
|
this.agenda = new Agenda();
|
|
this.agenda = new Agenda();
|
|
|
this.currentPanel = new EditPane(this.agenda);
|
|
this.currentPanel = new EditPane(this.agenda);
|
|
|
- this.add(this.currentPanel);
|
|
|
|
|
|
|
+ this.add(currentPanel);
|
|
|
this.setResizable(true);
|
|
this.setResizable(true);
|
|
|
this.setBounds(100,100,1440,900);
|
|
this.setBounds(100,100,1440,900);
|
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
@@ -40,7 +41,7 @@ public class MainFrame extends JFrame{
|
|
|
this.setVisible(true);
|
|
this.setVisible(true);
|
|
|
|
|
|
|
|
this.length = 100000;
|
|
this.length = 100000;
|
|
|
- this.width = 100000;
|
|
|
|
|
|
|
+ this.terainwidth = 10000;
|
|
|
this.terrain = SimulatorPane.Terrains.UNDEFINED;
|
|
this.terrain = SimulatorPane.Terrains.UNDEFINED;
|
|
|
|
|
|
|
|
this.getContentPane().setBackground( Color.WHITE );
|
|
this.getContentPane().setBackground( Color.WHITE );
|
|
@@ -71,7 +72,7 @@ public class MainFrame extends JFrame{
|
|
|
this.updateView(new AgendaPane(this.agenda));
|
|
this.updateView(new AgendaPane(this.agenda));
|
|
|
break;
|
|
break;
|
|
|
case SIMULATOR:
|
|
case SIMULATOR:
|
|
|
- this.updateView(new SimulatorPane(this.agenda, this.length, this.width, this.terrain));
|
|
|
|
|
|
|
+ this.updateView(new SimulatorPane(this.agenda, this.length, this.terainwidth, this.terrain));
|
|
|
break;
|
|
break;
|
|
|
case TABLE:
|
|
case TABLE:
|
|
|
this.updateView(new Table(this.agenda));
|
|
this.updateView(new Table(this.agenda));
|
|
@@ -87,12 +88,12 @@ public class MainFrame extends JFrame{
|
|
|
this.length = length;
|
|
this.length = length;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void setWidth(int width){
|
|
|
|
|
- this.width = width;
|
|
|
|
|
|
|
+ public void setTerainWidth(int width){
|
|
|
|
|
+ this.terainwidth = width;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public int getWidth(){
|
|
|
|
|
- return width;
|
|
|
|
|
|
|
+ public int getTerainWidth(){
|
|
|
|
|
+ return terainwidth;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public int getLength(){
|
|
public int getLength(){
|