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
cef1efab
Commit
cef1efab
authored
Nov 13, 2016
by
Jakob Schöttl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor scenarioJPanel
parent
9af716b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
VadereGui/src/org/vadere/gui/projectview/view/ScenarioJPanel.java
...i/src/org/vadere/gui/projectview/view/ScenarioJPanel.java
+12
-17
No files found.
VadereGui/src/org/vadere/gui/projectview/view/ScenarioJPanel.java
View file @
cef1efab
...
...
@@ -14,18 +14,13 @@ import org.vadere.simulator.projects.Scenario;
import
org.vadere.simulator.projects.VadereProject
;
import
org.vadere.state.scenario.Topography
;
import
org.vadere.state.util.StateJsonConverter
;
import
org.vadere.util.io.IOUtils
;
import
java.awt.*
;
import
java.awt.event.ActionEvent
;
import
java.beans.IntrospectionException
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.swing.*
;
import
javax.swing.border.EmptyBorder
;
...
...
@@ -66,13 +61,13 @@ public class ScenarioJPanel extends JPanel implements IProjectChangeListener, Pr
this
.
onlineVisualization
=
new
OnlineVisualization
(
true
);
this
.
postVisualizationView
=
new
PostvisualizationWindow
(
model
.
getCurrentProjectPath
());
super
.
setBorder
(
new
EmptyBorder
(
5
,
5
,
5
,
5
));
super
.
setLayout
(
new
CardLayout
(
0
,
0
));
super
.
setBounds
(
0
,
0
,
500
,
100
);
setBorder
(
new
EmptyBorder
(
5
,
5
,
5
,
5
));
setLayout
(
new
CardLayout
(
0
,
0
));
setBounds
(
0
,
0
,
500
,
100
);
}
private
void
initialize
()
{
this
.
initialized
=
true
;
initialized
=
true
;
// Edit card...
JPanel
editCard
=
new
JPanel
();
...
...
@@ -272,20 +267,20 @@ public class ScenarioJPanel extends JPanel implements IProjectChangeListener, Pr
}
}
public
void
clear
()
{
this
.
scenarioName
.
setText
(
""
);
this
.
initialized
=
false
;
public
void
clear
ScenarioView
()
{
scenarioName
.
setText
(
""
);
initialized
=
false
;
super
.
removeAll
();
removeAll
();
super
.
setBorder
(
new
EmptyBorder
(
5
,
5
,
5
,
5
));
super
.
setLayout
(
new
CardLayout
(
0
,
0
));
super
.
setBounds
(
0
,
0
,
500
,
100
);
setBorder
(
new
EmptyBorder
(
5
,
5
,
5
,
5
));
setLayout
(
new
CardLayout
(
0
,
0
));
setBounds
(
0
,
0
,
500
,
100
);
}
@Override
public
void
projectChanged
(
final
VadereProject
project
)
{
clear
();
clear
ScenarioView
();
project
.
setVisualization
(
onlineVisualization
);
}
...
...
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