Re: LinkLayer and Timer

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Apr 16 2002 - 11:57:53 EDT

Hi Orlando,

Sorry for the confusion - the Timer should call linkLayer.doPrepare().
Rather, the Timer should call doPrepare() on an instance of LinkLayer
that you want to redraw, not on a static method on the class. I don't
believe that the DayNightLayer has any static methods that it uses for
its timer, either.

The timer should be an instantiated object, where it's listener knows
about a particular LinkLayer instance, and calls doPrepare() on it.

Hope this helps,

Don

On Tuesday, April 16, 2002, at 11:48 AM, orlando feitosa wrote:

> Hi Don,
>
> Thanks for your answer.
>
> I beg your pardon for bothering you with this simple question but, when
> I tried to call the LinkLayer.doPrepare() from the Timer layer I got
> the following error in the compilation:
>
> Non-static method doPrepare() cannot be referenced from a static context
>
> I tried to identify why the Timer Layer(DayNightLayer) is considered
> STATIC without success and afterwards I tried to change the doPrepare()
> method to STATIC in the LinkLayer, but other related variables must be
> changed to static too.
>
> Do you know what is wrong?
>
> Regards,
>
> Orlando
>
>
>
>> From: Don Dietrick <dietrick@bbn.com>
>> To: "orlando feitosa" <snapsurf@hotmail.com>
>> CC: openmap-users@bbn.com
>> Subject: Re: LinkLayer and Timer
>> Date: Mon, 15 Apr 2002 12:39:26 -0400
>>
>> Hi Orlando,
>>
>> The Timer can call LinkLayer.doPrepare() to cause the LinkLayer to
>> fetch data from the server.
>>
>> Note that any time a layer repaints itself, all layers have to repaint
>> themselves. The difference here is that the other layers don't have
>> to handle a changed projection to gather OMGraphics. They just have
>> to paint the objects on the map - which is why you want to make sure
>> that your layer does as little work as possible in the paint() method.
>>
>> Cheers,
>>
>> Don
>>
>> On Sunday, April 14, 2002, at 09:41 PM, orlando feitosa wrote:
>>
>>> Hi Friends,
>>>
>>> IÌm trying to develop a layer to animate an object with a TIMER.
>>>
>>> As suggested in the archive list, I created a new layer based in the
>>> DayNightLayer JUST to implement a timer (javax.swing.Timer).
>>> I would like to use this new layer TIMER to update / repaint the
>>> projection of another layer (LinkLayer which accesses information in
>>> a DB).
>>>
>>> In the moment, both layers work fine separately, and to update /
>>> repaint the LinkLayer I have to change all map projection (zoom in
>>> /out with mouse in navigation) to call the listen method
>>> LinkMapRequest graphicsQuery = link.getMapRequest().
>>>
>>> My question is, how can I use this layer TIMER to update / repaint
>>> JUST the LinkLayer automatically without having to repaint all layers
>>> in the map.
>>>
>>> Thanks for any help.
>>>
>>> Best Regards,
>>>
>>> Orlando
>>>
>>>
>>> _________________________________________________________________
>>> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>>
>>> --
>>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>>> with the following text in the BODY of the message "unsubscribe
>>> openmap-users"]
>>>
>>>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Apr 16 11:59:04 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT