Skip to content
Snippets Groups Projects
Commit e0154a3a authored by Lukas Ladenberger's avatar Lukas Ladenberger
Browse files

removed some files + libraries + replaced some old libraries

parent bd58dec6
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 284 deletions
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry exported="true" kind="lib" path="lib/ext/antlr-2.7.7.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/asm-4.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/groovy-2.0.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/xmlpull-1.1.3.1.jar"/> <classpathentry exported="true" kind="lib" path="lib/ext/xmlpull-1.1.3.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/xstream-1.4.3.jar"/> <classpathentry exported="true" kind="lib" path="lib/ext/xstream-1.4.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/groovy-all-1.8.6.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/ext/xpp3_min-1.1.4c.jar"/> <classpathentry exported="true" kind="lib" path="lib/ext/xpp3_min-1.1.4c.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ext/animation-1.2.0.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -167,8 +167,9 @@ Export-Package: com.thoughtworks.xstream, ...@@ -167,8 +167,9 @@ Export-Package: com.thoughtworks.xstream,
org.eclipse.swt.widgets, org.eclipse.swt.widgets,
de.bmotionstudio.gef.editor" de.bmotionstudio.gef.editor"
Bundle-ClassPath: lib/ext/xpp3_min-1.1.4c.jar, Bundle-ClassPath: lib/ext/xpp3_min-1.1.4c.jar,
lib/ext/animation-1.2.0.jar,
., .,
lib/ext/groovy-all-1.8.6.jar,
lib/ext/xstream-1.4.3.jar, lib/ext/xstream-1.4.3.jar,
lib/ext/xmlpull-1.1.3.1.jar lib/ext/xmlpull-1.1.3.1.jar,
lib/ext/groovy-2.0.5.jar,
lib/ext/asm-4.0.jar,
lib/ext/antlr-2.7.7.jar
...@@ -6,7 +6,9 @@ bin.includes = plugin.xml,\ ...@@ -6,7 +6,9 @@ bin.includes = plugin.xml,\
icons/,\ icons/,\
schema/,\ schema/,\
lib/,\ lib/,\
lib/ext/groovy-all-1.8.6.jar,\
lib/ext/xstream-1.4.3.jar,\ lib/ext/xstream-1.4.3.jar,\
lib/ext/xmlpull-1.1.3.1.jar lib/ext/xmlpull-1.1.3.1.jar,\
lib/ext/groovy-2.0.5.jar,\
lib/ext/asm-4.0.jar,\
lib/ext/antlr-2.7.7.jar
File deleted
File added
File added
File added
File added
File deleted
...@@ -142,13 +142,13 @@ ...@@ -142,13 +142,13 @@
<extension <extension
point="de.prob.core.animation"> point="de.prob.core.animation">
<listener <listener
class="de.bmotionstudio.gef.editor.animation.StaticListenerRegistry"> class="de.bmotionstudio.gef.editor.StaticListenerRegistry">
</listener> </listener>
</extension> </extension>
<extension <extension
point="de.prob.core.lifecycle"> point="de.prob.core.lifecycle">
<listener <listener
class="de.bmotionstudio.gef.editor.animation.StaticListenerRegistry"> class="de.bmotionstudio.gef.editor.StaticListenerRegistry">
</listener> </listener>
</extension> </extension>
<extension <extension
......
...@@ -13,7 +13,6 @@ import java.util.Map; ...@@ -13,7 +13,6 @@ import java.util.Map;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import de.bmotionstudio.gef.editor.animation.StaticListenerRegistry;
import de.bmotionstudio.gef.editor.model.BControl; import de.bmotionstudio.gef.editor.model.BControl;
import de.bmotionstudio.gef.editor.model.Visualization; import de.bmotionstudio.gef.editor.model.Visualization;
import de.prob.core.Animator; import de.prob.core.Animator;
......
...@@ -35,7 +35,6 @@ import org.xml.sax.SAXException; ...@@ -35,7 +35,6 @@ import org.xml.sax.SAXException;
import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.mapper.MapperWrapper; import com.thoughtworks.xstream.mapper.MapperWrapper;
import de.bmotionstudio.gef.editor.animation.StaticListenerRegistry;
import de.bmotionstudio.gef.editor.internal.BMSConverter512; import de.bmotionstudio.gef.editor.internal.BMSConverter512;
import de.bmotionstudio.gef.editor.model.Visualization; import de.bmotionstudio.gef.editor.model.Visualization;
import de.prob.core.ILifecycleListener; import de.prob.core.ILifecycleListener;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */ * */
package de.bmotionstudio.gef.editor.animation; package de.bmotionstudio.gef.editor;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
......
/**
* (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen,
* Heinrich Heine Universitaet Duesseldorf
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.bmotionstudio.gef.editor.animation;
import java.util.ArrayList;
import org.eclipse.draw2d.geometry.Point;
import com.jgoodies.animation.AbstractAnimation;
import com.jgoodies.animation.AnimationFunction;
import com.jgoodies.animation.AnimationFunctions;
import com.jgoodies.animation.Animator;
import de.bmotionstudio.gef.editor.AttributeConstants;
import de.bmotionstudio.gef.editor.model.BControl;
public class AnimationMove extends AbstractAnimation {
private AnimationFunction af;
private ArrayList<Point> points = new ArrayList<Point>();
private Animator animator;
private BControl control;
public AnimationMove(long duration, boolean freezed, BControl control,
Integer toX, Integer toY) {
super(duration, freezed);
this.control = control;
Integer fromX = Integer.valueOf(control.getAttributeValue(
AttributeConstants.ATTRIBUTE_X).toString());
Integer fromY = Integer.valueOf(control.getAttributeValue(
AttributeConstants.ATTRIBUTE_Y).toString());
Bresenham br = new Bresenham();
br.plot(fromX, fromY, toX, toY);
points.clear();
while (br.next()) {
Point pt = new Point(br.getX(), br.getY());
points.add(pt);
}
af = AnimationFunctions.discrete(duration(), points
.toArray(new Point[points.size()]));
}
public void start() {
if (points != null) {
if (points.size() > 0) {
animator = new Animator(this, 30);
animator.start();
} else {
fireAnimationStopped(30);
}
}
}
protected void applyEffect(long time) {
Point pt = (Point) af.valueAt(time);
control.setLocation(pt);
}
}
/**
* (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen,
* Heinrich Heine Universitaet Duesseldorf
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.bmotionstudio.gef.editor.animation;
public final class Bresenham {
/** The start and end of the line */
// private int x1, y1, x2, y2;
/** Used for calculation */
private int dx, dy, error, x_inc, y_inc, xx, yy, length, count;
/** General case algorithm */
private static final Bresenham bresenham = new Bresenham();
/**
* Construct a Bresenham algorithm.
*/
public Bresenham() {
}
/**
* Plot a line between (x1,y1) and (x2,y2). To step through the line use
* next().
*
* @return the length of the line (which will be 1 more than you are
* expecting).
*/
public int plot(int x1, int y1, int x2, int y2) {
// this.x1 = x1;
// this.x2 = x2;
// this.y1 = y1;
// this.y2 = y2;
// compute horizontal and vertical deltas
dx = x2 - x1;
dy = y2 - y1;
// test which direction the line is going in i.e. slope angle
if (dx >= 0) {
x_inc = 1;
} else {
x_inc = -1;
dx = -dx; // need absolute value
}
// test y component of slope
if (dy >= 0) {
y_inc = 1;
} else {
y_inc = -1;
dy = -dy; // need absolute value
}
xx = x1;
yy = y1;
if (dx > 0)
error = dx >> 1;
else
error = dy >> 1;
count = 0;
length = Math.max(dx, dy) + 1;
return length;
}
/**
* Get the next point in the line. You must not call next() if the previous
* invocation of next() returned false.
*
* Retrieve the X and Y coordinates of the line with getX() and getY().
*
* @return true if there is another point to come.
*/
public boolean next() {
// now based on which delta is greater we can draw the line
if (dx > dy) {
// adjust the error term
error += dy;
// test if error has overflowed
if (error >= dx) {
error -= dx;
// move to next line
yy += y_inc;
}
// move to the next pixel
xx += x_inc;
} else {
// adjust the error term
error += dx;
// test if error overflowed
if (error >= dy) {
error -= dy;
// move to next line
xx += x_inc;
}
// move to the next pixel
yy += y_inc;
}
count++;
return count < length;
}
/**
* @return the current X coordinate
*/
public int getX() {
return xx;
}
/**
* @return the current Y coordinate
*/
public int getY() {
return yy;
}
/**
* Plot a line between (x1,y1) and (x2,y2). The results are placed in x[]
* and y[], which must be large enough.
*
* @return the length of the line or the length of x[]/y[], whichever is
* smaller
*/
public static final int plot(final int x1, final int y1, final int x2,
final int y2, final int x[], final int y[]) {
int length = Math.min(x.length, Math.min(y.length, bresenham.plot(x1,
y1, x2, y2)));
for (int i = 0; i < length; i++) {
bresenham.next();
x[i] = bresenham.getX();
y[i] = bresenham.getY();
}
return length;
/*
*
* int dx; // difference in x's int dy; // difference in y's int error =
* 0; // the discriminant i.e. error i.e. decision variable int x_inc;
* int y_inc; int index; // used for looping
*
* // compute horizontal and vertical deltas dx = x2 - x1; dy = y2 - y1;
*
* // test which direction the line is going in i.e. slope angle if (dx
* >= 0) { x_inc = 1; } else { x_inc = -1; dx = -dx; // need absolute
* value
*
* }
*
* // test y component of slope
*
* if (dy >= 0) { y_inc = 1; } else { y_inc = -1; dy = -dy; // need
* absolute value
*
* }
*
* int xx = x1, yy = y1;
*
* // now based on which delta is greater we can draw the line if (dx >
* dy) { error = dx >> 1; // draw the line for (index = 0; index <= dx
* && index < x.length; index++) { // remember the point x[index] = xx;
* y[index] = yy;
*
* // adjust the error term error += dy;
*
* // test if error has overflowed if (error >= dx) { error -= dx;
*
* // move to next line yy += y_inc; }
*
* // move to the next pixel xx += x_inc; } return Math.min(x.length,
* dx); } else { error = dy >> 1; // draw the line for (index = 0; index
* <= dy && index < y.length; index++) { // remember the point x[index]
* = xx; y[index] = yy;
*
* // adjust the error term error += dx;
*
* // test if error overflowed if (error >= dy) { error -= dy;
*
* // move to next line xx += x_inc; }
*
* // move to the next pixel yy += y_inc; } return Math.min(y.length,
* dy); }
*/
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment