Hi Dmitri,

On 1/21/2009 8:43 PM Dmitri Trembovetski wrote:
implementation of this method in the Container class that recursively calls this method for every child of the container.

The question is: is it really possible for one toplevel to contain components having different GraphicsDevice's (and/or different GraphicsConfiguration's)? Or may I assume that all and every descendant components of a toplevel window use the same GC that the window uses (and therefore the Container.checkGD() may safely be removed)?

  We should enforce that all components within a toplevel have the
  same GC. If checkGD does that I wouldn't remove it.
"Asserts" are fine as long as they are simple and fast. But if we're sure we don't have several GC/GDs per toplevel window, then I don't see much reason to waste time recursively traversing the whole hierarchy of components of a container when it gets added to another container.

Perhaps it would make sense to move the graphicsConfig member to
the Window class and use its value for
Component.getGraphicsConfiguration()? A component not currently
contained in a toplevel window obviously should have a null GC.  Thoughts?

--
best regards,
Anthony

Reply via email to