Re: algorithmic question

Adam Megacz <[email protected]> Thu, 01 Apr 2004 02:37:04 -0800
Newsgroups gmane.comp.java.xwt.core
Organization XWT
Message-ID <[email protected]>
Charles Goodwin <[email protected]> writes:
> Having been working on Box.java a bit, one concern here would be how to
> store the old solution such that we don't use copious amounts of memory
> for each box.

Precisely.  You do get to store the width/height of the box in its
width/height properties.  And adding a few flags (like
CANNOT_GET_ANY_BIGGER) would be okay.

> What happens when a box, low down in the ascendency chain, resizes such
> that it affects the width of the column it is in?  How do you notify the
> parent that one of it's column widths has changed?

When you change the box's size, it will propagate a needs_reflow() up
the tree, which sets the NEED_REFLOW flag on all its parents, which
then causes the reflow() operation to trace down the tree along the
same path before rendering.

  - a