R. Clayton (rclayton@monmouth.edu)
(no date)
I changed my code to work with the animation interface, but all it does is draw
the graph and say that it's done; nothing other than the graph is displayed.
What do I need to do with the NodePairingAnimatorInterface once I get a
reference to it in my NodeRunnable?
You need to call the various animator interface methods at the various points
in your code that you want things to happen in the animation, as in the
following code
receiver.send(Message.partnerMessage, this);
final int otherNodeIndex = receiver.returnNodeIndex();
nodePairingAnimator.setEdgeColor(nodeIndex, otherNodeIndex, Color.yellow,
"Node " + nodeIndex + " asks node " + otherNodeIndex +
" to form a pair.");
in which one node sends a message to another node and then turns the edge
between them yellow.
I know that my code finds pairs correctly (or at least I'm close to positive
that it does).
Always a dangerous thing to think. Your program has some synchronization
problems; I haven't had time to take a close look at them to see how serious
they are. You might want to run your code through ladybug.
This archive was generated by hypermail 2.0b3 on Tue Aug 12 2003 - 09:30:05 EDT