Commit e9265044 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "ScenarioPanel", added "Events" tab (but no de-/serialization so far).

parent 208cd179
......@@ -301,6 +301,7 @@ Tab.Model.insertModelNameMenu.title=Insert model name
Tab.Model.insertModelNameSubMenu.title=Main models
Tab.Pedestrians.title=Pedestrians
Tab.Topography.title=Topography
Tab.Event.title=Events
Tab.OutputProcessors.title=Data processing GUI
Tab.TopographyCreator.title=Topography creator
Tab.PostVisualization.title=Post-Visualization
......
......@@ -300,6 +300,7 @@ Tab.Model.insertModelNameMenu.title=Model-Name einf\u00fcgen
Tab.Model.insertModelNameSubMenu.title=Hauptmodelle
Tab.Pedestrians.title=Fu\u00dfg\u00e4nger
Tab.Topography.title=Topographie
Tab.Event.title=Events
Tab.OutputProcessors.title=Datenverarbeitung
Tab.TopographyCreator.title=Topographie-Designer
Tab.PostVisualization.title=Post-Visualisierung
......
package org.vadere.gui.projectview.view;
public enum AttributeType {
SIMULATION, MODEL, PEDESTRIAN, CAR, TOPOGRAPHY, OUTPUTPROCESSOR;
SIMULATION, MODEL, PEDESTRIAN, CAR, TOPOGRAPHY, OUTPUTPROCESSOR, EVENT;
public final static String simulationAttributes = "simulation attributes";
public final static String modelAttributes = "panelModel attributes";
public final static String pedestrianAttributes = "pedestrian attributes";
public final static String scenarioAttributes = "scenario attributes";
public final static String carAttributes = "car attributes";
public final static String eventAttributes = "event attributes";
public static AttributeType fromName(String name) {
switch (name) {
......@@ -21,6 +22,8 @@ public enum AttributeType {
return TOPOGRAPHY;
case carAttributes:
return CAR;
case eventAttributes:
return EVENT;
default:
throw new IllegalArgumentException("name " + name + " does not match any attribute type.");
}
......
......@@ -40,6 +40,7 @@ public class ScenarioPanel extends JPanel implements IProjectChangeListener, Pro
private TextView attributesSimulationView; // Simulation tab
private TextView attributesModelView; // Model tab
private TextView topographyFileView; // Topography tab
private TextView eventFileView; // Event tab
private DataProcessingView dataProcessingGUIview; // DataProcessing
private TopographyWindow topographyCreatorView; // Topography creator tab... OR:
private final PostvisualizationWindow postVisualizationView; // Post-Visualization tab, replaces Topography tab if output is selected
......@@ -184,6 +185,11 @@ public class ScenarioPanel extends JPanel implements IProjectChangeListener, Pro
topographyFileView = new TextView("/scenarios", "default_directory_scenarios", AttributeType.TOPOGRAPHY);
tabbedPane.addTab(Messages.getString("Tab.Topography.title"), topographyFileView);
eventFileView = new TextView("/attributes", "default_directory_attributes", AttributeType.EVENT);
eventFileView.isEditable(true);
tabbedPane.addTab(Messages.getString("Tab.Event.title"), eventFileView);
dataProcessingGUIview = new DataProcessingView();
tabbedPane.addTab(Messages.getString("Tab.OutputProcessors.title"), dataProcessingGUIview);
// online visualization card...
......
......@@ -264,7 +264,7 @@ public class Simulation {
events.add(eventFactory.getEvent(ElapsedTimeEvent.class, simTimeInSec));
}
// TODO Why are target controller readded in each simulation loop?
// TODO Why are target controllers readded in each simulation loop?
this.targetControllers.clear();
for (Target target : this.topographyController.getTopography().getTargets()) {
targetControllers.add(new TargetController(this.topographyController.getTopography(), target));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment