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
SimAquaLife
GR3D
Commits
da1eb0bc
Commit
da1eb0bc
authored
Sep 14, 2020
by
patrick.lambert
Browse files
map color as private field
parent
5fbe2bd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
data/input/northeastamerica/RIO_obs_NEA.xml
View file @
da1eb0bc
...
...
@@ -6,6 +6,7 @@
<environment.RIOBasinNetworkObserverWithContinent>
<title>
North East America
</title>
<threshold>
1000000
</threshold>
<colorScaleEnum>
RedsScale
</colorScaleEnum>
</environment.RIOBasinNetworkObserverWithContinent>
<environment.RIOBasinNetworkObserverPresence>
...
...
src/main/java/environment/RIOBasinNetworkObserverWithContinent.java
View file @
da1eb0bc
...
...
@@ -41,7 +41,7 @@ public class RIOBasinNetworkObserverWithContinent extends ObserverListener
private
double
threshold
=
13000000
.;
@Description
(
name
=
"Color scale"
,
tooltip
=
""
)
p
ublic
ColorScaleEnum
colorScaleEnum
=
ColorScaleEnum
.
RedsScale
;
p
rivate
ColorScaleEnum
colorScaleEnum
=
ColorScaleEnum
.
RedsScale
;
// a basin network
private
transient
RIOBasinNetworkWithContinent
bn
;
...
...
@@ -299,7 +299,9 @@ public class RIOBasinNetworkObserverWithContinent extends ObserverListener
for
(
DiadromousFishGroup
group
:
basin
.
getGroups
())
{
abundance
+=
basin
.
getEffective
(
group
);
}
// System.out.println(basin.getName()+ "-->"+abundance);
if
(
basin
instanceof
RiverBasin
&
abundance
>
0
)
System
.
out
.
println
(
" "
+
basin
.
getName
()
+
" ("
+
basin
.
getClass
().
getSimpleName
()
+
") -->"
+
abundance
);
if
(
abundance
==
0
.)
{
g
.
setColor
(
Color
.
WHITE
);
}
else
{
...
...
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