Subject: | |
From: | |
Reply To: | |
Date: | Sun, 21 Nov 2010 16:21:25 +0000 |
Content-Type: | multipart/alternative |
Parts/Attachments: |
|
|
Hi all,
This is a question about Geomason.
//reada the worl mapshapefile
worldMap = new WorldMap(this);
worldPortrayal.setField(worldMap.worldMap);
//inheritics the GeomPortrayal with an updated draw.
colorWorldPetroleumPortrayal=new ColorWorldPetroleumPortrayal(new
SimpleColorMap(0.0, 2000.0, Color.BLACK, Color.RED),this);
public void draw(Object object, Graphics2D graphics, DrawInfo2D info)
{
MasonGeometry gm= (MasonGeometry) object;
ArrayList<AttributeField> arrayL=
(ArrayList<AttributeField>)gm.geometry.getUserData();
Iterator itr= arrayL.iterator();
AttributeField attriField;
while(itr.hasNext())
{
attriField = (AttributeField) itr.next();
if (attriField.name.equals("CNTRY_NAME"))
{
paint = colorMap.getColor(getAgent((String) attriField.value));
// System.out.println(getAgent((String) attriField.value) + "
"+ attriField.value);
}
}
super.draw(object, graphics, info);
}
The above codes works well. But what it fails to do is to update the
map after each step despite the use of: display = new Display2D(755,
405, this, 1).
Note the the colors of the map is updated (reflecting the new values
as) when I click on it (it seems that the mouseclick forces it to
update). How can I force it to repaint after each step? I tries the:
display.reset();
display.repaint();
without success.
Any help?
Regards,
Vlasios
==============================================
Dr Vlasios Voudouris <[log in to unmask]>
CIBS Deputy Director
Centre for International Business and Sustainability
London Metropolitan Business School
London Metropolitan University
84 Moorgate, London EC2M 6SQ, UK
web (CIBS): http://www.londonmet.ac.uk/lmbs/research/cibs/
web (gamlss): www.gamlss.com
web(Cities Institute): http://www.citiesinstitute.org/staff/vlasios-voudouris.cfm
SSRN Author: http://ssrn.com/author=1145910
Save a tree...please don't print this e-mail unless you really need to
==============================================
|
|
|