Skip to content

Commit a2b8885

Browse files
committed
Merge branch 'release/1-2-0'
2 parents 3fd8fde + 097df63 commit a2b8885

File tree

354 files changed

+8564
-726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+8564
-726
lines changed

CHANGELOG.md

Lines changed: 156 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,160 @@ This file lists modifications introduced by each version.
44

55
## [Unreleased]
66

7-
* empty
7+
* Empty
8+
9+
## [1.2.0] - 2020/02/12
10+
11+
### ClockManager class modifications
12+
13+
**Bug fixes in ClockManager:**
14+
15+
[[issue 86]][issue: #86]
16+
17+
* The modification of the `ClockManager`'s internal time value (the one actually used by the `Topology`) now coincides
18+
with the ticking of the `Clock`
19+
20+
Now, the clock is first incremented and then the `Scheduler` is called.
21+
It was previously swapped, resulting in some user interactions happening before the call to the `Scheduler` (and thus
22+
the `MessageEngine` and all `Node.onClock()`).
23+
Everything is now properly synchronized.
24+
25+
**Symbol modification in ClockManager**
26+
27+
* `ClockManager.currentTime()` now returns an `int` instead of an `Integer`
28+
29+
This value could never be `null`. The return value being an object was a remnant of previous versions.
30+
31+
[issue: #86]: https://github.com/jbotsim/JBotSim/issues/86
32+
33+
### MessageEngine modifications
34+
35+
[[issue 85]][issue: #85] [[issue 83]][issue: #83]
36+
37+
Some changes have been applied in an effort to simplify, clarify and speed-up the *message engine* system.
38+
39+
* `MessageEngine` is now an interface
40+
* A `reset()` method has been added
41+
* It does not handle delays anymore
42+
43+
44+
* The former `MessageEngine` has been renamed to `DefaultMessageEngine`
45+
46+
`io.jbotsim.core.MessageEngine` -> `io.jbotsim.core.DefaultMessageEngine`
47+
48+
* It does not handle delays (see `DelayMessageEngine`)
49+
* It speeds-up former check on link existence
50+
51+
* A specific `DelayMessageEngine` has been re-created in `jbotsim-core`/`io.jbotsim.core`
52+
53+
* It handles instantaneous delays better than the former `MessageEngine` used to
54+
* It also handles general delays better than the former `MessageEngine` used to
55+
* A new `DelayMessageEngine.disableLinksContinuityChecks()` method has been added
56+
57+
This method prevents the system from checking the existence of the link each step while it is delayed.
58+
The check still remains at the end of the sending round and before the delivery round.
59+
This speeds message processing up when you send a lot of delayed messages in a static environment.
60+
* `AsyncMessageEngine` and `RandomMessageEngine` implementations have been modified to benefit from the new
61+
`DelayMessageEngine` capabilities
62+
63+
* `RandomMessageEngine` has been renamed into `RandomDelayMessageEngine`
64+
65+
`jbotsim-extras-common`/`io.jbotsim.contrib.messaging.RandomMessageEngine` -> `io.jbotsim.contrib.messaging.RandomDelayMessageEngine`
66+
67+
68+
* Test classes and examples have been added to showcase all MessageEngines behaviors
69+
70+
If you used to inherit from `MessageEngine`, you have several options:
71+
* inherit from `DefaultMessageEngine` (no delay feature)
72+
* inherit from `DelayMessageEngine` (has delay feature)
73+
* actually implement the `MessageEngine` interface
74+
75+
### Topology class modifications
76+
77+
**Bug fixes in Topology:**
78+
79+
* `Topology.restart()` and `Topology.clearMessages()` now properly remove delayed messages [[issue 83]][issue: #83]
80+
81+
This is delegated to the new `MessageEngine.reset()` method.
82+
83+
[issue: #83]: https://github.com/jbotsim/JBotSim/issues/83
84+
85+
### Node class modifications
86+
87+
**New symbols in Node:**
88+
* `Node.hasNeighbor(Node)`, `Node.hasInNeighbor(Node)`, `Node.hasOutNeighbor(Node)` have been created [[issue 85]][issue: #85]
89+
90+
These methods allow you to directly test the presence of the provided `Node` in the neighborhood of the object
91+
on which they are called. Please see documentation for details.
92+
93+
**Modifications in Node:**
94+
* `Node.getOutNeighbors()` has been improved, avoiding unnecessary copies [[issue 85]][issue: #85]
95+
96+
### Message class modifications
97+
98+
**New symbol in Message:**
99+
100+
* `Message.isRetryModeEnabled()` accessor has been created [[issue 85]][issue: #85]
101+
102+
[issue: #85]: https://github.com/jbotsim/JBotSim/issues/85
103+
104+
### TikzTopologySerializer class modifications
105+
106+
[[issue 80]][issue: #80]
107+
108+
**Behavior modifications in TikzTopologySerializer:**
109+
110+
* Directed links are now supported
111+
112+
Directed links are properly exported (using `"->"` option).
113+
This supposes that `Topology.getOrientation()` returns `DIRECTED`.
114+
* TikZ colors are now better supported
115+
* The previous *scale* parameter is now a proper scale factor
116+
117+
Its previous default value was `50`. It is now `1/50.`, resulting in the same default value.
118+
119+
**Symbol modifications in TikzTopologySerializer:**
120+
121+
* The `TikzTopologySerializer.DEFAULT_EOL` constant has been added
122+
123+
This constant sets the value of the default End-Of-Line delimiter: `"\n"`.
124+
125+
* The `TikzTopologySerializer.DEFAULT_SCALE_FACTOR` constant has been added
126+
127+
This constant sets the default scale factor that must be applied to the distance between nodes: `1/50`.
128+
129+
* A new constructor `TikzTopologySerializer(String, double)` has been added
130+
131+
This constructor allows to specify custom values for both the *EOL* and the *scale factor*.
132+
133+
* `exportTopology(Topology topology, double scaleFactor)` is now `protected`
134+
135+
It was previously `public`. You can achieve the same behavior by using the new constructor.
136+
137+
[issue: #80]: https://github.com/jbotsim/JBotSim/issues/80
138+
139+
### New icon in the jbotsim-icons module
140+
141+
`jbotsim-icons`/`io.jbotsim.ui.icons`
142+
143+
* A fully transparent new icon has been added [[issue 84]][issue: #84]
144+
* `jbotsim-icons`/`io/jbotsim/ui/icons/transparent.png`
145+
146+
As usual, it's path can be accessed using the corresponding constant `Icons.TRANSPARENT`.
147+
148+
[issue: #84]: https://github.com/jbotsim/JBotSim/issues/84
149+
150+
### JNode class modifications
151+
152+
[[issue 77]][issue: #77]
153+
154+
**Bug fix in JNode:**
155+
156+
* The wired `Link` created between two nodes using the Swing UI (start a right click on the first and drag to the second
157+
before releasing the button) now takes `Topology.getOrientation()` into account instead of always creating undirected
158+
links
159+
160+
[issue: #77]: https://github.com/jbotsim/JBotSim/issues/77
8161

9162
## [1.1.1] - 2019/09/26
10163

@@ -807,7 +960,8 @@ have executed their onStart() method before that, you may simply call start()
807960
on your topology immediately followed by a call to pause().
808961
(Eventually we will provide an atomic call to this effect.)
809962

810-
[Unreleased]: https://github.com/jbotsim/JBotSim/compare/v1.1.1...develop
963+
[Unreleased]: https://github.com/jbotsim/JBotSim/compare/v1.2.0...develop
964+
[1.2.0]: https://github.com/jbotsim/JBotSim/compare/v1.1.1...v1.2.0
811965
[1.1.1]: https://github.com/jbotsim/JBotSim/compare/v1.1.0...v1.1.1
812966
[1.1.0]: https://github.com/jbotsim/JBotSim/compare/v1.0.0...v1.1.0
813967
[1.0.0]: https://github.com/jbotsim/JBotSim/compare/v1.0.0-beta03...v1.0.0

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
[![Build Status](https://travis-ci.org/jbotsim/JBotSim.svg?branch=master)][travis-jbotsim]
3-
[![Maven Central](https://img.shields.io/badge/maven%20central-1.1.1-informational.svg)][mavencentral-jbotsim-latest]
3+
[![Maven Central](https://img.shields.io/badge/maven%20central-1.2.0-informational.svg)][mavencentral-jbotsim-latest]
44
[![License](https://img.shields.io/badge/license-LGPL%20≥%203.0-informational.svg)][lgpl3]
55

66

@@ -58,7 +58,7 @@ artifact will best suit your project's needs):
5858
* choose `From Maven ...`.
5959

6060
* In the "Download Library from Maven Repository" popup:
61-
* provide the following dependence `io.jbotsim:jbotsim-all:1.1.1`
61+
* provide the following dependence `io.jbotsim:jbotsim-all:1.2.0`
6262
* make sure to tick `JavaDocs`
6363
* Hit `OK`.
6464
* Confirm that you want to add it to your (only) module.
@@ -98,7 +98,7 @@ examples.
9898
## Current version
9999

100100

101-
The latest public version is [`1.1.1`][mavencentral-jbotsim-latest].
101+
The latest public version is [`1.2.0`][mavencentral-jbotsim-latest].
102102
Please see the [CHANGELOG.md](CHANGELOG.md) for previous versions modifications.
103103

104104

@@ -127,7 +127,7 @@ If your build system uses *Gradle*, you will want to add something like this to
127127

128128
```
129129
dependencies {
130-
implementation "io.jbotsim:jbotsim-all:1.1.1"
130+
implementation "io.jbotsim:jbotsim-all:1.2.0"
131131
}
132132
```
133133

@@ -140,15 +140,15 @@ If your build system uses *Maven*, you will want to add something like this to y
140140
<dependency>
141141
<groupId>io.jbotsim</groupId>
142142
<artifactId>jbotsim-all</artifactId>
143-
<version>1.1.1</version>
143+
<version>1.2.0</version>
144144
</dependency>
145145
```
146146

147147
### Using IntelliJ IDEA
148148

149149
If you use a _Java Project_ in _IntelliJ IDEA_, add the following dependency (as explained [here](#declaring-the-dependency)):
150150
```
151-
io.jbotsim:jbotsim-all:1.1.1
151+
io.jbotsim:jbotsim-all:1.2.0
152152
```
153153

154154

@@ -178,7 +178,7 @@ The JBotSim project will gladly welcome help. If you consider contributing, plea
178178

179179
## License
180180

181-
(C) Copyright 2008-2019, by [Arnaud Casteigts and the JBotSim contributors](CONTRIBUTORS.md). All rights reserved.
181+
(C) Copyright 2008-2020, by [Arnaud Casteigts and the JBotSim contributors](CONTRIBUTORS.md). All rights reserved.
182182

183183

184184
JBotSim is published under license [LGPL 3.0 or later][lgpl3].
@@ -206,7 +206,7 @@ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys DFA48EDB1EDEBA6F
206206

207207
[travis-jbotsim]: https://travis-ci.org/jbotsim/JBotSim
208208
[github-jbotsim]: https://github.com/jbotsim/JBotSim
209-
[mavencentral-jbotsim-latest]: https://search.maven.org/search?q=g:io.jbotsim%20AND%20v:1.1.1
209+
[mavencentral-jbotsim-latest]: https://search.maven.org/search?q=g:io.jbotsim%20AND%20v:1.2.0
210210
[mavencentral-jbotsim]: https://search.maven.org/search?q=g:io.jbotsim
211211
[github-jbotsim-issues]: https://github.com/jbotsim/JBotSim/issues
212212
[lgpl3]: http://www.gnu.org/licenses/lgpl-3.0.html

apps/examples/CreateUserProject.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Any JBotSim classes, source code and documentation will automatically be downloa
118118
* choose `From Maven ...`.
119119

120120
* In the "Download Library from Maven Repository" popup:
121-
* provide the following dependency: `io.jbotsim:jbotsim-all:1.1.1`
121+
* provide the following dependency: `io.jbotsim:jbotsim-all:1.2.0`
122122
* make sure to tick `JavaDocs`
123123
* Hit `OK`.
124124
* Confirm that you want to add it to your (only) module.
@@ -141,7 +141,7 @@ Simply add the following line to your `build.gradle`:
141141

142142
```
143143
dependencies {
144-
implementation "io.jbotsim:jbotsim-all:1.1.1"
144+
implementation "io.jbotsim:jbotsim-all:1.2.0"
145145
}
146146
```
147147

@@ -201,7 +201,7 @@ dependencies {
201201

202202
```
203203
dependencies {
204-
compile files('mylibs/jbotsim-full-1.1.1.jar')
204+
compile files('mylibs/jbotsim-full-1.2.0.jar')
205205
}
206206
```
207207

apps/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ artifact suits your needs).
3030
So our `build.gradle` will simply declare the dependency as follows:
3131
```
3232
dependencies {
33-
implementation "io.jbotsim:jbotsim-ui-swing:1.1.1"
33+
implementation "io.jbotsim:jbotsim-ui-swing:1.2.0"
3434
}
3535
```
3636
Gradle and Maven will take care of retrieving any required dependencies.

apps/examples/src/main/java/examples/JBackgroundPainterHD.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008 - 2019, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
2+
* Copyright 2008 - 2020, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
33
*
44
*
55
* This file is part of JBotSim.

apps/examples/src/main/java/examples/JLinkPainterHD.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008 - 2019, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
2+
* Copyright 2008 - 2020, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
33
*
44
*
55
* This file is part of JBotSim.

apps/examples/src/main/java/examples/VideoHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008 - 2019, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
2+
* Copyright 2008 - 2020, Arnaud Casteigts and the JBotSim contributors <contact@jbotsim.io>
33
*
44
*
55
* This file is part of JBotSim.

apps/examples/src/main/java/examples/basic/basic/BasicNode.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
* Copyright 2008 - 2020, 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+
122
package examples.basic.basic;
223

324
import io.jbotsim.core.Message;

apps/examples/src/main/java/examples/basic/broadcasting/BroadcastingNode.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
* Copyright 2008 - 2020, 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+
122
package examples.basic.broadcasting;
223

324
import io.jbotsim.core.Color;

apps/examples/src/main/java/examples/basic/broadcasting/Main.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
* Copyright 2008 - 2020, 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+
122
package examples.basic.broadcasting;
223

324
import io.jbotsim.core.Topology;

0 commit comments

Comments
 (0)