Re: [Jaslibrary-support] Interface IColored
Brought to you by:
sonnessa
|
From: Michele S. <son...@di...> - 2003-12-17 13:37:35
|
The jas.space.MultiObjGrid contains an array of object for each cell.
It is a problem for the LayerObjGridDrawer constructor, which looks for=20
IColored objects in each cell.
The jas.plot package contains a special drawer for the MultiObjGrid=20
objects: the jas.plot.LayerMultiObjectGridDrawer.
In order to plot IColored agents - using the MultiObjGrid - you have to use=
=20
the LayerMultiObjectGridDrawer.
An instruction like the following (in the observer code) should fix the=20
problem.
LayerMultiObjectGridDrawer s =3D new=20
LayerMultiObjectGridDrawer("Bugs", (MultiObjGrid) model.world);
Cheers,
Michele
At 13.46 17/12/2003, you wrote:
>Hi,
>
>I've got a collection of agents in a MultiObjGrid, and each of them=20
>implements the IColored interface, as they provide their own colour. I get=
=20
>this warning:
>
>java.lang.IllegalArgumentException: The matrix passed to=20
>LayerObjGridDrawer must contain IColored objects if no color is passed to=
=20
>the constructor.
>
>If I give LayerObjGridDrawer a default colour in the constructor, it uses=
=20
>the default colour and does not recognise the agents in the grid=20
>implementing IColored.
>
>This doesn't seem to be a problem related to version 1.0beta, it happens=20
>with 0.2 as well.
>
>Any suggestions?
>
>Thanks,
>Nils
>--
>--------------------------------------------------------
>Nils Weidmann
>
>Wissenschaftliches Zentrum f=FCr Umweltsystemforschung
>Universit=E4t Kassel, Kurt-Wolters-Stra=DFe 3, 34109 Kassel
>Tel: +49 (0)561 - 804 3905, Fax: +49 (0)561 - 804 3176
>wei...@us...
>http://www.usf.uni-kassel.de
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IBM Linux Tutorials.
>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=CCk
>_______________________________________________
>Jaslibrary-support mailing list
>Jas...@li...
>https://lists.sourceforge.net/lists/listinfo/jaslibrary-support
>
|