Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Processing 3 final. #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ doc/
data/splendor-big.png
src/de/fhpotsdam/unfolding/mapdisplay/GLGraphicsMapDisplayTransparentTest.java
/bin/
/target/
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ Create interactive thematic maps and geovisualizations.
* <http://unfoldingmaps.org/>
* <https://github.com/tillnagel/unfolding>

Compilation :

``` bash
mvn install
mvn javadoc:javadoc
sh createLibrary.sh
```

Updated version for Processing 3.

Compilation :

``` bash
mvn install
mvn javadoc:javadoc
sh createLibrary.sh
```


## About
### Interaction Events
Unfolding enables you to rapidly create interactive maps. Basic interactions
Expand Down Expand Up @@ -54,5 +73,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


49 changes: 49 additions & 0 deletions createLibrary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

TMP=tmp
NAME=Unfolding

mkdir $TMP
mkdir $TMP/$NAME
mkdir $TMP/$NAME/library
mkdir $TMP/$NAME/reference

echo "Copy Library"
# Library
cp target/$NAME.jar $TMP/$NAME/library/$NAME.jar


echo "Copy the sources"
# copy the source also
cp -R src $TMP/$NAME/
cp -R data $TMP/$NAME/
cp -R lib-processing/* $TMP/$NAME/library/

cp -R test $TMP/$NAME/
# cp -R data $TMP/$NAME/

# Not really an external library. It is here until
# Processing is in Maven Central.
#rm $TMP/$NAME/lib/core.jar

echo "Copy the examples"
cp -R examples $TMP/$NAME/

cp -R pom.xml $TMP/$NAME/

echo "Copy the JavaDoc"
cp -R target/site/apidocs/* $TMP/$NAME/reference/

echo "Create the archive..."
cd $TMP

tar -zcf $NAME.tgz $NAME

mv $NAME.tgz ..
cd ..

echo "Clean "
rm -rf $TMP


echo "Creation OK"
Binary file added lib-processing/json4processing.jar
Binary file not shown.
186 changes: 186 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.inria</groupId>
<artifactId>unfolding</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>unfolding</name>

<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>examples</source>
<source>examples-extern</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<finalName>Unfolding</finalName>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<!-- <tags>
<tag>
<name>webref</name>
todo tag for all places
<placement>a</placement>
<head>link to website: </head>
</tag>
<tag>
<name>nowebref</name>
todo tag for all places
<placement>a</placement>
<head>no link to website:</head>
</tag>
</tags>-->
</configuration>
</plugin>
</plugins>

</build>

<dependencies>
<dependency>
<groupId>org.processing</groupId>
<artifactId>core</artifactId>
<version>3.0</version>
</dependency>


<dependency>
<groupId>gluegen-rt</groupId>
<artifactId>gluegen-rt</artifactId>
<version>3.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/gluegen-rt.jar</systemPath>
</dependency>
<dependency>
<groupId>jogl-all</groupId>
<artifactId>jogl-all</artifactId>
<version>3.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jogl-all.jar</systemPath>
</dependency>

<dependency>
<groupId>json4processing</groupId>
<artifactId>json4processing</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/json4processing.jar</systemPath>
</dependency>

<dependency>
<groupId>sqlite-jdbc</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/sqlite-jdbc-3.7.2.jar</systemPath>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-processing/log4j-1.2.15.jar</systemPath>
</dependency>

<dependency>
<groupId>libTUIO</groupId>
<artifactId>libTUIO</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/libTUIO.jar</systemPath>
</dependency>

<dependency>
<groupId>org.processing</groupId>
<artifactId>core</artifactId>
<version>3.0</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>handy</groupId>
<artifactId>handy</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-extern/handy.jar</systemPath>
</dependency>
<dependency>
<groupId>ani</groupId>
<artifactId>ani</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-extern/Ani.jar</systemPath>
</dependency>
<dependency>
<groupId>geonames</groupId>
<artifactId>geonames</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-extern/geonames-1.1.6.jar</systemPath>
</dependency>
<dependency>
<groupId>controlP5</groupId>
<artifactId>controlP5</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-extern/controlP5.jar</systemPath>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib-extern/joda-time-2.0.jar</systemPath>
</dependency>
</dependencies>

<properties>
<netbeans.hint.license>license</netbeans.hint.license>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public TuioCursorHandler(PApplet p, boolean listenToTuio, List<UnfoldingMap> map
}
tuioClient.connect();

p.registerDispose(this);
p.registerMethod("dispose", this);
}

public TuioCursorHandler(PApplet p, List<UnfoldingMap> maps) {
Expand Down
8 changes: 4 additions & 4 deletions src/de/fhpotsdam/unfolding/mapdisplay/OpenGLMapDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public OpenGLMapDisplay(PApplet papplet, AbstractMapProvider provider, String re
}

offscreenPG = papplet.createGraphics((int) width, (int) height, this.renderer);
offscreenPG.smooth(papplet.g.quality);
offscreenPG.smooth(papplet.g.smooth);
offscreenCutoffPG = papplet.createGraphics((int) width, (int) height, this.renderer);
offscreenCutoffPG.smooth(papplet.g.quality);
offscreenCutoffPG.smooth(papplet.g.smooth);
}

public void setMapDisplayShader(MapDisplayShader shader) {
Expand All @@ -79,9 +79,9 @@ public void resize(float width, float height) {
}

offscreenPG = papplet.createGraphics((int) width, (int) height, renderer);
offscreenPG.smooth(papplet.g.quality);
offscreenPG.smooth(papplet.g.smooth);
offscreenCutoffPG = papplet.createGraphics((int) width, (int) height, renderer);
offscreenCutoffPG.smooth(papplet.g.quality);
offscreenCutoffPG.smooth(papplet.g.smooth);

if (mapDisplayShader != null) {
mapDisplayShader.resize(width, height);
Expand Down
3 changes: 2 additions & 1 deletion test/de/fhpotsdam/AbstractShapeMarkerLocationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public void before() {
}

private void addCountryMarker() {
List<Feature> countries = GeoJSONReader.loadData(p, "data/countries.geo.json");
// System.out.println("Sketch Path " + p.sketchPath());
List<Feature> countries = GeoJSONReader.loadData(p, p.sketchPath() +"/data/data/countries.geo.json");
List<Marker> countryMarkers = MapUtils.createSimpleMarkers(countries);
map.addMarkers(countryMarkers);
}
Expand Down
2 changes: 1 addition & 1 deletion test/de/fhpotsdam/ImageLoadingTestApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void setup() {
if (bytes == null) {
} else {
Image awtImage = Toolkit.getDefaultToolkit().createImage(bytes);
MediaTracker tracker = new MediaTracker(this);
MediaTracker tracker = new MediaTracker(this.frame);
tracker.addImage(awtImage, 0);
try {
tracker.waitForAll();
Expand Down
2 changes: 1 addition & 1 deletion test/de/fhpotsdam/transmatrix/MultiTransObjectApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void setup() {
transObjects.add(new TuioTransformableObject(this, 500, 200, 300, 300));
transObjects.add(new TextThing(this, 600, 50, 340, 70));

addMouseWheelListener(new java.awt.event.MouseWheelListener() {
frame.addMouseWheelListener(new java.awt.event.MouseWheelListener() {
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
mouseWheel(evt.getWheelRotation());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void setup() {

debugDisplay = new DebugDisplay(this, map, 0, 0);

addMouseWheelListener(new java.awt.event.MouseWheelListener() {
frame.addMouseWheelListener(new java.awt.event.MouseWheelListener() {
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
mouseWheel(evt.getWheelRotation());
}
Expand Down