[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model/plugin HangingChainPackage.java, 1.
Status: Pre-Alpha
Brought to you by:
henryml
From: Sebastian G. <sg...@us...> - 2011-04-10 15:00:14
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/plugin In directory vz-cvs-2.sog:/tmp/cvs-serv30565/src/net/sourceforge/bprocessor/model/plugin Modified Files: HangingChainPackage.java Log Message: Index: HangingChainPackage.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/plugin/HangingChainPackage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HangingChainPackage.java 10 Apr 2011 14:31:08 -0000 1.1 --- HangingChainPackage.java 10 Apr 2011 15:00:12 -0000 1.2 *************** *** 2,28 **** import net.sourceforge.bprocessor.model.Command; - import net.sourceforge.bprocessor.model.Item; import net.sourceforge.bprocessor.model.Space; public class HangingChainPackage { ! ! public static class HangingChain extends NetCommand { boolean increase; double radius; public void initialize(Space net) { super.initialize(net); ! //create a copy of B-Net "Space" ! //Space hNet = Item.createNet("hSpace"); ! Space hNet = net.copy(net.getOwnParameters()); ! } public void evaluate() { clear(); ! } } ! public HangingChainPackage() { ! Command.register(HangingChain.class); } ! } --- 2,36 ---- import net.sourceforge.bprocessor.model.Command; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.plugin.CirclePackage.Circle; public class HangingChainPackage { ! public static class Springsystem extends NetCommand { boolean increase; double radius; public void initialize(Space net) { super.initialize(net); ! increase = true; ! radius = 2; } public void evaluate() { clear(); ! circle(radius); ! if (increase) { ! radius = radius + 0.1; ! if (radius > 10) { ! increase = false; ! } ! } else { ! radius = radius - 0.1; ! if (radius < 2) { ! increase = true; ! } ! } } } ! public HangingChainPackage() { ! Command.register(Springsystem.class); } ! } \ No newline at end of file |