File tree Expand file tree Collapse file tree 5 files changed +48
-0
lines changed
apps/examples/src/main/java/examples/basic/icons
lib/jbotsim-icons/src/main
resources/io/jbotsim/ui/icons Expand file tree Collapse file tree 5 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,17 @@ This file lists modifications introduced by each version.
44
55## [ Unreleased]
66
7+ ### New icon in the jbotsim-icons module
8+
9+ ` jbotsim-icons ` /` io.jbotsim.ui.icons `
10+
11+ * A fully transparent new icon has been added [[ issue 84]] [ issue: #84 ]
12+ * ` jbotsim-icons ` /` io/jbotsim/ui/icons/transparent.png `
13+
14+ As usual, it's path can be accessed using the corresponding constant ` Icons.TRANSPARENT ` .
15+
16+ [ issue: #84 ] : https://github.com/jbotsim/JBotSim/issues/84
17+
718### Topology class modifications
819
920** Bug fixes in Topology:**
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public static void main(String[] args) {
1212 deployAtCenter (topology , MovingNodeBlue .class , nbNodes );
1313 deployAtCenter (topology , MovingNodeFormer .class , nbNodes );
1414 deployAtCenter (topology , MovingNodePlus .class , nbNodes );
15+ deployAtCenter (topology , MovingNodeTransparent .class , nbNodes );
1516 deployAtCenter (topology , MovingNodeDefault .class , nbNodes );
1617
1718 new JViewer (topology );
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2008 - 2019, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
3+ *
4+ *
5+ * This file is part of JBotSim.
6+ *
7+ * JBotSim is free software: you can redistribute it and/or modify
8+ * it under the terms of the GNU Lesser General Public License as published by
9+ * the Free Software Foundation, either version 3 of the License, or
10+ * (at your option) any later version.
11+ *
12+ * JBotSim is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU Lesser General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU Lesser General Public License
18+ * along with JBotSim. If not, see <https://www.gnu.org/licenses/>.
19+ *
20+ */
21+
22+ package examples .basic .icons ;
23+
24+ import io .jbotsim .core .Color ;
25+ import io .jbotsim .ui .icons .Icons ;
26+
27+ public class MovingNodeTransparent extends RandomMovingNode {
28+ @ Override
29+ public void onStart () {
30+ super .onStart ();
31+ setIcon (Icons .TRANSPARENT );
32+ setColor (Color .BLUE );
33+ }
34+
35+ }
Original file line number Diff line number Diff line change @@ -43,5 +43,6 @@ public class Icons {
4343 public static final String SERVER = "/io/jbotsim/ui/icons/server.png" ;
4444 public static final String SHEEP = "/io/jbotsim/ui/icons/sheep.png" ;
4545 public static final String STATION = "/io/jbotsim/ui/icons/station.png" ;
46+ public static final String TRANSPARENT = "/io/jbotsim/ui/icons/transparent.png" ;
4647 public static final String WOLF = "/io/jbotsim/ui/icons/wolf.png" ;
4748}
You can’t perform that action at this time.
0 commit comments