Colin,
Yes, I forget to mentioned that I implemented your ideas but unfortunately the
MarkIterator is not rendered correctly. I slowed the timer period to update
every 15 seconds and modified my timer callback as follows:
/**Handles timer action */
public void actionPerformed (ActionEvent e){
synchronized (this.getTreeLock()){
//Remove all points.
m_Points.clear();
//Add the current position.
m_Points.add(new Point2D.Double(m_CurrLongDeg, m_CurrLatDeg));
//Update current position.
m_CurrLatDeg += 5.0;
if(m_CurrLatDeg > 90)
m_CurrLatDeg = 0.0;
m_CurrLongDeg += 0.0; //keep fixed, for now.
System.out.println("Update..................");
invalidate();
repaint((java.awt.geom.Rectangle2D) null);
}
}
I am currently in the process of building the GeoTools source code and
investigating this issue.
-----Original Message-----
From: Combe, Colin [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 10:01 AM
To: Palmer, Erik; Martin Desruisseaux; [email protected]
Subject: RE: [Geotools-gt2-users] Simple animation repaint issues
Does adding the synchronized block around invalidate() and repaint() or slowing
the update rate of the timer right down change anything? col
> -----Original Message-----
> From: Palmer, Erik [mailto:[EMAIL PROTECTED]
> Sent: 25 May 2006 14:25
> To: Martin Desruisseaux
> Cc: Combe, Colin
> Subject: RE: [Geotools-gt2-users] Simple animation repaint issues
>
> Thank you for the replies. I have replaced 'repaint()' with
> 'repaint(null)'. Unfortunately, the MarkIterator is not
> rendered correctly. I definitely believe it's related to
> clipping because I can now see a tiny slice of the label. The
> shape of the MarkIterator, however, is never rendered.
>
> I am confident my timer is working correctly because if I pan
> or zoom during the animation, the MarkIterator is drawn
> completely (shape and label) at the correct latitude and longitude.
>
> I will continue to look into this issue and will send a
> response with a possible solution. Thanks again for your help
> and insight.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Martin Desruisseaux
> Sent: Wednesday, May 24, 2006 10:30 PM
> To: Combe, Colin
> Cc: Palmer, Erik; [email protected]
> Subject: Re: [Geotools-gt2-users] Simple animation repaint issues
>
>
> Combe, Colin a écrit :
> > The main body of the animation loop boiled down to:
> > synchronized (this.getTreeLock()){
> > invalidate();
> > repaint((java.awt.geom.Rectangle2D) null);
> > }
> >
> > The getTreeLock() method will provide you with an object to
> use as a
> > lock to avoiding threading problems. The argument to the repaint
> > method is the area to repaint, as I remember, if it is null it
> > repaints everything
>
> Yes, exactly. Invoking 'repaint(null)' should be a workaround.
>
> The 'repaint()' method alone tries to repaint only the
> damaged screen area; it doesn't repaint
> everything like 'repaint(null)'. So in theory 'repaint()'
> should be more efficient than
> 'repaint(null)'. However for some reasons, its look like that
> 'repaint()' doesn't repaint the right
> screen area in this particular case. I don't know why yet.
>
> Martin.
>
>
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost
> and Risk! Fully trained technicians. The highest number of
> Red Hat certifications in the hosting industry. Fanatical
> Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users