[OpenMap Users] How can I effectively use repaint()?

From: Chris Allport <chris.allport_at_red-inc.us>
Date: Fri, 25 Mar 2005 12:28:13 -0500

When repaint() is called, does it simply redraw the current layer, or does
it try to redraw all layers?

In a BufferedMapBean application with multiple layers, does it make sense to
allow each layer to call repaint() as they change, or should one, single
repaint() be called after all layers are updated?

In reviewing EditableOMGraphic, it seems that when the object is moved:
  - the entire map is marked dirty - map.setBufferDirty(true)
  - all of the graphics are repainted - map.paintChildren(map.getGraphics())

Now, if a user is dragging an object around, they obviously cannot be
dragging around multiple objects, so maybe regerating the whole map during a
drag makes sense. However, what is the best way to manage repaint() in an
application with multiple graphics on multiple layers that are constantly
updated?

Thanks-

Chris

--
Chris Allport
Unmanned Systems Research & Development Lab
Patuxent River Naval Air Station
Phone: (301) 904-5943
--
[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 Fri Mar 25 2005 - 12:30:22 EST

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