Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
6db7cf65
Commit
6db7cf65
authored
Dec 20, 2016
by
Björn Richerzhagen
Browse files
Fixed potential NPE for some Bypass Evaluations w/o Vis
parent
21216cd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java
View file @
6db7cf65
...
...
@@ -519,6 +519,9 @@ public class VisualizationTopologyView extends JFrame
* @version 1.0, 03.04.2012
*/
public
static
class
VisualizationInjector
{
private
static
boolean
isActive
=
false
;
protected
static
WorldPanel
worldPanel
;
public
static
ComponentVisManager
visManager
;
...
...
@@ -588,6 +591,7 @@ public class VisualizationTopologyView extends JFrame
VisualizationInjector
.
visManager
=
visManager
;
VisualizationInjector
.
WORLD_X
=
WORLD_X
;
VisualizationInjector
.
WORLD_Y
=
WORLD_Y
;
VisualizationInjector
.
isActive
=
true
;
for
(
VisInfo
visInfo
:
components
)
{
visManager
.
addComponent
(
visInfo
);
...
...
@@ -598,6 +602,14 @@ public class VisualizationTopologyView extends JFrame
setupAWTEventListener
();
}
/**
* True if this component is active at all (can be used)
* @return
*/
public
static
boolean
isActive
()
{
return
isActive
;
}
public
static
VisualizationTopologyView
getTopologyView
()
{
return
view
;
...
...
@@ -800,6 +812,9 @@ public class VisualizationTopologyView extends JFrame
* @param comp
*/
public
static
void
injectComponent
(
VisualizationComponent
comp
)
{
if
(!
isActive
())
{
return
;
}
visManager
.
addComponent
(
comp
);
}
...
...
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