swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Graph and GraphElement in Java


From: Fred Wan
Subject: RE: Graph and GraphElement in Java
Date: Wed, 13 Sep 2000 21:44:56 +0200

Hi

I have trouble understanding the following fragment in SimpleObserverBug and
translating it to Java. Can someone help me out here? Especially the
M(drawSelfOn) is puzzling. In jheatbugs a message is sent to a heatbug
object that then draws itself, but what happens here is unclear.

Thanks,

Fred Wan,
dept. Artificial Intelligence,
Vrije Universiteit Amsterdam,
The Netherlands.

  bugDisplay = [Object2dDisplay createBegin: self];
  [bugDisplay setDisplayWidget: worldRaster];
  [bugDisplay setDiscrete2dToDisplay: [modelSwarm getWorld]];
  [bugDisplay setObjectCollection: [modelSwarm getBugList]];
  [bugDisplay setDisplayMessage: M(drawSelfOn:)];   // draw method
  bugDisplay = [bugDisplay createEnd];



-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of Marcus G. Daniels
Sent: Wednesday, September 13, 2000 5:01 PM
To: address@hidden
Subject: Re: Graph and GraphElement in Java


>>>>> "MB" == Marie-Edith Bissey <address@hidden> writes:

MB> In an experiment written for Swarm in ObjectiveC, I am using the
MB> Graph and GraphElement classes in order to represent graphically
MB> the results of the simulation.  I would like to "translate" this
MB> program using javaSwarm, but cannot find any Graph classes in
MB> Java. The documentation makes me think these classes are actually
MB> not implemented in javaSwarm. In this case, what is the
MB> alternative?

The `gui' interfaces are available if you really want them, but
you need to rebuild Swarm from source with a few changes.¹

Instead, I would suggest you go to www.jars.com and search for "plot".
`ptplot' is one that I know works.

¹ The variable *removed-protocols* in java-stub.el (or interface.el
in the snapshot sources) is a list of all the protocols that are taken
out of the Swarm/Java layer.  Simply remove the lines you want back and
do a new build/install.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]