public OptionPanel(TrafficLightSimulator simulator) {
		this.setSimulator(simulator);

		
		if (this.getSimulator().getCurrentSimulation().isLoaded()) {
			optionDialog = new OptionDialog(this.getSimulator());
			optionDialog.pack();
		}
		
		
		this.setLayout(new GridBagLayout());

		GridBagConstraints c = new GridBagConstraints();
		
		c.anchor = GridBagConstraints.NORTH;

		//c.weighty = 1;
		c.fill = GridBagConstraints.HORIZONTAL;
		
		


		JLabel lb1 = new JLabel("Simulation Status");
		Font font = lb1.getFont();
		Font boldFont = new Font(font.getFontName(), Font.BOLD, font.getSize());
		lb1.setFont(boldFont);
	
		c.gridx = 0;
		c.gridy = 0;


		this.add(lb1, c);
		
		
			
		this.btRunSimulation = new JButton("Start");
		this.btRunSimulation.addActionListener(this);
		
		c.gridx = 0;
		c.gridy = 1;
		
		if (!this.getSimulator().getCurrentSimulation().isLoaded()) {
			this.btRunSimulation.setEnabled(false);
			this.btRunSimulation.setToolTipText("No Simulation loaded");
		}
		
		this.add(btRunSimulation, c);
		
		this.btBreak = new JButton("Break");
		this.btBreak.addActionListener(this);
		this.btBreak.setEnabled(false);
		
		c.gridx = 1;
		c.gridy = 1;
		this.add(btBreak, c);
				
		
		
		JLabel lb2 = new JLabel("Traffic Light Mode");

	
		c.gridx = 0;
		c.gridy = 2;

		this.add(lb2, c);
		
		String[] lightModeOptions = {"manual","sequence","smart"};
		
		LightModeSelector = new JComboBox<String>(lightModeOptions);
		
		if (this.getSimulator().getCurrentMode() == TrafficLightMode.manuel) {
			LightModeSelector.setSelectedIndex(0);
		}
		if (this.getSimulator().getCurrentMode() == TrafficLightMode.sequenze) {
			LightModeSelector.setSelectedIndex(1);
		}
		if (this.getSimulator().getCurrentMode() == TrafficLightMode.smart) {
			LightModeSelector.setSelectedIndex(2);
		}
		
		LightModeSelector.addActionListener(this);
		
		c.gridx = 1;
		c.gridy = 2;
		this.add(LightModeSelector, c);
		
		JLabel lb3 = new JLabel("Simulation Mode");

		
		c.gridx = 0;
		c.gridy = 3;

		this.add(lb3, c);
		
		String[] simulationModeOptions = {"manual","automatic"};
		
		SimulationModeSelector = new JComboBox<String>(simulationModeOptions);
		
		if (this.getSimulator().getSimulationMode() == SimulationMode.manuel) {
			SimulationModeSelector.setSelectedIndex(0);
		}
		if (this.getSimulator().getSimulationMode() == SimulationMode.automatic) {
			SimulationModeSelector.setSelectedIndex(1);
		}

		
		SimulationModeSelector.addActionListener(this);
		
		c.gridx = 1;
		c.gridy = 3;
		this.add(SimulationModeSelector, c);
		
		this.btShowConfig = new JButton("Simulation Control");
		this.btShowConfig.addActionListener(this);
		
		c.gridx = 0;
		c.gridy = 4;
		c.gridwidth = 2;
		
		if (!this.getSimulator().getCurrentSimulation().isLoaded()) {
			this.btShowConfig.setEnabled(false);
			this.btShowConfig.setToolTipText("No Simulation loaded");
		}
		this.add(this.btShowConfig,c);
		
		JLabel lb4 = new JLabel("Vehicle Injection Speed");

		
		c.gridx = 0;
		c.gridy = 5;

		this.add(lb4, c);
		
		this.simulationFrequency = new JSlider(0,100,20);
		this.simulationFrequency.setMajorTickSpacing(10);
		this.simulationFrequency.setMinorTickSpacing(5);
		this.simulationFrequency.setPaintTicks(true);
		this.simulationFrequency.setLabelTable(this.simulationFrequency.createStandardLabels(10));
		this.simulationFrequency.setPaintLabels(true);
		this.simulationFrequency.addChangeListener(this);
		
		c.gridx = 0;
		c.gridy = 6;
		

		this.add(this.simulationFrequency, c);
		
		this.btloadXML = new JButton("Load Scenario");
		this.btloadXML.addActionListener(this);
		
		c.gridx = 0;
		c.gridy = 7;
		c.gridwidth = 1;
		this.add(btloadXML, c);
		
		this.btsaveXML = new JButton("Save Scenario");
		this.btsaveXML.addActionListener(this);
		
		c.gridx = 1;
		c.gridy = 7;
		this.add(btsaveXML, c);

		
	}