Hi, Anthony.
Fix looks good.

On 24.05.2013 19:50, Anthony Petrov wrote:
On 05/24/2013 07:39 PM, Sergey Bylokhov wrote:
On 24.05.2013 19:19, Anthony Petrov wrote:
Hi Sergey,

I don't believe so. While LWAWT toolkit uses Swing components
internally, these internal components never use a real component from
the actual components hierarchy as their parent. Invalidating the
internal components can't cause the actual components to be invalidated.
Ok. thanks.
Another question is: probably we can override
AWTTextPane.isValidateRoot() to return true? Does it help?

AWTTextPane extends JScrollPane. The JScrollPane.isValidateRoot() is already overridden and returns true. However, the invalidate() method takes the isValidateRoot() into account *only* in the java.awt.smartInvalidate=true mode which isn't the default (for compatibility reasons).

Hence, my fix forces this mode locally for the XTextAreaPeer internal implementation only. This doesn't affect compatibility because the internal components have never been exposed to user code anyway, and at the same time avoids invalidating actual user components, thus preventing the bug from appearing.

--
best regards,
Anthony



--
best regards,
Anthony

On 05/24/2013 07:07 PM, Sergey Bylokhov wrote:
Hi, Anthony.
Is our LWTextAreaPeer has the same problem?

On 24.05.2013 17:44, Anthony Petrov wrote:
Hello,

Please review a fix for http://bugs.sun.com/view_bug.do?bug_id=8013189
at:

http://cr.openjdk.java.net/~anthony/8-58-textAreaMixing-8013189.0/

Root cause:
The TextArea's parent is set as a parent for internal XTextAreaPeer
components, causing the parent to be invalidated when the internal
components get invalidated.

Solution:
Implement the java.awt.smartInvalidate behavior locally for the
XTextAreaPeer internal components. This prevents the invalidation of
the TextArea's parent, and the bug is resolved.

--
best regards,
Anthony






--
Best regards, Sergey.

Reply via email to