Thursday, March 29, 2007

PropertyWindow class

There was this message on the Repast mailing list the other day:

Dear list,
I want to probe some variables of my agents of the OpenMap Layer. I did this by making the following method:
public String[] gisPropertyList() {

String []gisPropertyList = {"Lat/Lon","getLatLonPointString","nativeCountry","getNativeCountry",

"residence","getResidence","age","getAge","gender","getGender" };


return gisPropertyList;

It works, however when I probe one of my agents I get the screen below. It seems like something is on top of the last fields. How can I fix this? Thanks!


I had exactly the same problem as this is to do with the PropertyWindow class which only permits 4 items to be displayed in the anl.repast.gis.display package. Click here to see my modification that works around this problem. I hope this helps.


1 comment:

Andrew Crooks said...

I got this comment back:

Thanks a lot for the provided code and the comments in it. I had to follow your practice of overriding Repast classes though. Now not only does my probing work well now. You also illustrated a more elegant solution to override Repast classes. Before I had my own (copied) repast project and changed code where needed. However it was hard to see what exactly I had overridden from the original Repast project.

For the others in this list, what Andrew did is to put the overridden classes in its own project having the same package and class name. His project is added to the classpath before the repast project so that the new class is used instead of the original class. See the comments in the code of the PropertyWindow in the revious post for more information.