|
@@ -23,7 +23,7 @@ public class MainFrame extends JFrame{
|
|
|
public enum Views{EDITOR, SIMULATOR, AGENDA, TABLE};
|
|
public enum Views{EDITOR, SIMULATOR, AGENDA, TABLE};
|
|
|
|
|
|
|
|
private Agenda agenda;
|
|
private Agenda agenda;
|
|
|
- private JPanel currentPanel;
|
|
|
|
|
|
|
+ private JPanel currentPanel, simulatorpanel;
|
|
|
|
|
|
|
|
private int length;
|
|
private int length;
|
|
|
private int terainwidth;
|
|
private int terainwidth;
|
|
@@ -72,7 +72,12 @@ 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.terainwidth, this.terrain));
|
|
|
|
|
|
|
+ if(simulatorpanel == null){
|
|
|
|
|
+ simulatorpanel = new SimulatorPane(this.agenda, this.length, this.terainwidth, this.terrain);
|
|
|
|
|
+ this.updateView(simulatorpanel);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.updateView(simulatorpanel);
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case TABLE:
|
|
case TABLE:
|
|
|
this.updateView(new Table(this.agenda));
|
|
this.updateView(new Table(this.agenda));
|