Re: [OpenMap Users] SimpleBeanLayer or InteractionLayer?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 29 Apr 2008 12:47:50 -0400

Hi Adam,

You may not need the SimpleBeanLayer to get what you want. The
com.bbn.openmap.examples.bean package was written to demonstrate a
bean capability outside of the general OpenMap framework, in a way
where the map objects could describe themselves to other widgets for
representation in different types of GUIs. The package was written by
another project team here at BBN, so I am a little rusty on the
specifics.

I would recommend extending OMGraphicHandlerLayer, and then do what
Alessio suggested - regenerate the OMGraphics that have changed, and
call repaint on the layer. Two other things - make sure the other
layers that don't change are marked to be background layers, either
programmatically or via the properties, and use the
BufferedLayerMapBean. Also, if you are constantly receiving rapid
updates from an external thread, you might want to add a timer to your
layer that calls repaint() in consistent intervals, as opposed to
calling it whenever an object is updated.

Hope this helps,

Don


On Apr 21, 2008, at 9:27 PM, Adams Tan wrote:

> Thank you Alessio for the prompt reply.. seems like we are doing
> similar apps...
>
> I've also extended InteractionLayer (which is a grandchild of
> OMGraphicHandlerLayer), but instead of calling setList, I used a
> Swing Timer to call doPrepare. I'm not sure if which way is better,
> but doPrepare seems to call a lot of unnecessary stuff... maybe I'll
> try your approach.
>
> However, my question in bringing up SimpleBeanLayer is because the
> JavaBeans framework in OpenMap seems to be doing a lot of what I
> hope to achieve eventually (such as object selection, properties
> editor, etc). I was wondering if they would introduce too much
> complexity as compared to simply extending OMGraphicHandlerLayer. In
> short, I am looking at the pros and cons of using the 2 different
> approach.
>
> Adams Tan
>
> On Mon, Apr 21, 2008 at 4:57 PM, Alessio Iannone <alessio_iannone_at_yahoo.it
> > wrote:
> Hi Adam, to solve the same task i have simply extended an
> OMGraphicHandlerLayer and call setList method, now when i want to
> animate an object I just call the regenerate method
> on a generic openmap obiecj (<T extends BasicGeometry>...so I mean
> on any openmap object that extends BasicGeometry).
> Basically the sequence of operation i perform is:
>
> For each object i want to animate:
> change it's attribute (like position)
> call regenerate
> End For
> At the end of this cicle issue a repaint request on the layer
> holding these objects.
>
> I have tested with about 2000 air track (to which i have added some
> extra info, that is part of 2525b package support that I am
> developing). and on a dual core 2.0Ghz intel machine with a Linux OS
> the cpu is no more than 30-40% and the updates rates are about 5 per
> seconds....Obviously if you need to add o remove object to the list
> you have to call again setList
>
> Best Regards
>
> Alessio Iannone
> Software Engineer
>
> Mobile: 39 329 8834960
> Email: alessio.iannone_at_nextant.it
> IM: quonn77_at_hotmail.com (AIM)
> http://www.linkedin.com/in/alessioiannone
> Web sites of the Martial Arts I play
>
> Nextant - Navcomm Applications
> Via Alessandro Noale
> See who we know in common
> Want a signature like this?
>
>
> ----- Messaggio originale -----
> Da: Adams Tan <nikida78_at_gmail.com>
> A: openmap-users_at_bbn.com
> Inviato: Luned́ 21 aprile 2008, 10:35:43
> Oggetto: [OpenMap Users] SimpleBeanLayer or InteractionLayer?
>
>
> Hi,
>
> I am fairly new to OpenMap API, and have the following queries
> regarding the abovementioned subject.
>
> A little background first; I am animating a large amount of objects
> (up to 5000), movement of each objects varies, some (500 objects)
> will move every 5 secs, the rest every 1 min.
>
> I started extending the InteractionLayer and use a Swing Timer to
> animate the objects. Lately, i've discovered that I can also use
> SimpleBeanLayer, as long as I make my objects extend from
> SimpleBeanObject.
>
> I do like the drag n drop functionality, but it is not strictly
> necessary.
>
> Hence, should I stick to InteractionLayer? Or switch to
> SimpleBeanLayer?
>
> Please advise...
>
> Adams Tan
>
> Inviato da Yahoo! Mail.
> La casella di posta intelligente.
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Apr 29 2008 - 12:48:11 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT