> Hi Lillian, > > > - reshape in Component was fixed. invalidate() was only being called on > > the component if it has moved or has been resized. But the problem is > > that a component could be moved, because its parent moved, and the > > component would not know about it. > > invalidate() should always be called on the component when reshape (or > > setBounds) is called. This way, all components are invalidated, in case > > they have been moved or resized because of their parent. > > I don't understand this one. When a component has reshape() called, then > this has nothing to do with the parent beeing moved. If the parent > moves, the relative position to the children will not change. However, > the layout mechanism should update the relative child positions if > necessary. I think we do not need to call invalidate() if the component > has not moved or is not resized. However, if it is not removed or > resized, we can simply return from this method call anyway.
I really think you should revert this, except if you can come up with a testcase that shows that invalidate must be called when nothing really changes. The only thing that I could imagine that matters is that peer.setBounds could be called, although I doubt that it really matters.. The reason why I am so suspicious about this change is that invalidate is potentially expensive (or better, the next validate is expensive then). Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
