Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
vadere
vadere
Commits
81dd0f86
Commit
81dd0f86
authored
Oct 11, 2017
by
Benedikt Zoennchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the change of the name of an output file should now work from within the gui
parent
9e38e233
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
VadereGui/src/org/vadere/gui/projectview/view/DataProcessingView.java
...c/org/vadere/gui/projectview/view/DataProcessingView.java
+2
-1
VadereGui/src/org/vadere/gui/projectview/view/ScenarioPanel.java
...ui/src/org/vadere/gui/projectview/view/ScenarioPanel.java
+2
-0
VadereModelTests/TestOSM/scenarios/basic_1_chicken_osm1.scenario
...odelTests/TestOSM/scenarios/basic_1_chicken_osm1.scenario
+9
-2
VadereSimulator/src/org/vadere/simulator/projects/dataprocessing/outputfile/OutputFile.java
...ulator/projects/dataprocessing/outputfile/OutputFile.java
+8
-1
No files found.
VadereGui/src/org/vadere/gui/projectview/view/DataProcessingView.java
View file @
81dd0f86
...
...
@@ -57,6 +57,7 @@ import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
import
org.fife.ui.rsyntaxtextarea.Theme
;
import
org.vadere.gui.components.utils.Messages
;
import
org.vadere.gui.components.view.JComboCheckBox
;
import
org.vadere.gui.projectview.model.ProjectViewModel
;
import
org.vadere.gui.projectview.utils.ClassFinder
;
import
org.vadere.simulator.projects.Scenario
;
import
org.vadere.simulator.projects.dataprocessing.DataProcessingJsonManager
;
...
...
@@ -87,7 +88,6 @@ class DataProcessingView extends JPanel implements IJsonView {
private
Scenario
currentScenario
;
private
boolean
isEditable
;
DataProcessingView
()
{
setLayout
(
new
BorderLayout
());
// force it to span across the whole available space
...
...
@@ -240,6 +240,7 @@ class DataProcessingView extends JPanel implements IJsonView {
JButton
addFileBtn
=
new
JButton
(
new
AbstractAction
(
"Add"
)
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
String
filename
=
"out.txt"
;
int
count
=
1
;
while
(
outputFileNameAlreadyExists
(
filename
))
{
// ensure unique suggested filename
...
...
VadereGui/src/org/vadere/gui/projectview/view/ScenarioPanel.java
View file @
81dd0f86
...
...
@@ -50,6 +50,7 @@ public class ScenarioPanel extends JPanel implements IProjectChangeListener, Pro
private
Scenario
scenario
;
private
boolean
initialized
;
private
ProjectViewModel
model
;
private
static
String
activeJsonParsingErrorMsg
=
null
;
...
...
@@ -58,6 +59,7 @@ public class ScenarioPanel extends JPanel implements IProjectChangeListener, Pro
this
.
scenarioName
=
scenarioName
;
this
.
onlineVisualization
=
new
OnlineVisualization
(
true
);
this
.
postVisualizationView
=
new
PostvisualizationWindow
(
model
.
getCurrentProjectPath
());
this
.
model
=
model
;
setBorder
(
new
EmptyBorder
(
5
,
5
,
5
,
5
));
setLayout
(
new
CardLayout
(
0
,
0
));
...
...
VadereModelTests/TestOSM/scenarios/basic_1_chicken_osm1.scenario
View file @
81dd0f86
...
...
@@ -3,8 +3,15 @@
"description" : "",
"release" : "0.2",
"processWriters" : {
"files" : [ ],
"processors" : [ ],
"files" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.outputfile.TimestepPedestrianIdOutputFile",
"filename" : "out.txt",
"processors" : [ 1 ]
} ],
"processors" : [ {
"type" : "org.vadere.simulator.projects.dataprocessing.processor.PedestrianPositionProcessor",
"id" : 1
} ],
"isTimestamped" : true
},
"scenario" : {
...
...
VadereSimulator/src/org/vadere/simulator/projects/dataprocessing/outputfile/OutputFile.java
View file @
81dd0f86
...
...
@@ -45,7 +45,14 @@ public abstract class OutputFile<K extends DataKey<K>> {
}
public
void
setRelativeFileName
(
final
String
fileName
)
{
this
.
fileName
=
new
File
(
this
.
fileName
).
getParentFile
().
toPath
().
resolve
(
fileName
).
toString
();
File
file
=
new
File
(
this
.
fileName
);
if
(
file
.
getParentFile
()
!=
null
)
{
this
.
fileName
=
new
File
(
this
.
fileName
).
getParentFile
().
toPath
().
resolve
(
fileName
).
toString
();
}
else
{
this
.
fileName
=
fileName
;
}
}
public
void
setProcessorIds
(
final
List
<
Integer
>
processorIds
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment