-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b77
-
generic
-
generic
One could suggest the user application to call the validate() on the top-level, but this is not the best solution as well. See the following justification:
*******************************************************************************
> You aren't the only one. The hw/lw mixing is a new feature, and it also
> brings some new requirements to work correctly. The main requirement is that
> the whole component hierarchy must be valid. Otherwise the mixing may not
> correctly do its job. So I suggest you to replace the panel.revalidate()
> call with the <the-toplevel-window>.validate() call instead. This will fix
> the issue.
Wouldn't it be better if revalidate was validating the full hierarchy
when a sub component is heavyweight? It could do its normal job and
post a runnable to validate the window ancestor in such a case.
Otherwise every time one does a revalidate, they have to know what
they embed to perform the right validation. This is not very possible
when you don't know what you embed (library integration for example).
As a matter of fact, I don't know myself if the component hierarchy I
am adding contains a native component: my program shows native stuff
and some non native stuff depending on the selection on the tree that
is located on the left side of the split pane.
*******************************************************************************
Since the AWT code always knows whether we do mixing or not, the Swing's revalidate() method may have the following logic:
1. If the mixing is taking place, it can find the toplevel ancestor of the container and call its validate() method.
2. Otherwise it must fall back to the current mechanism involving the validateRoots.
To identify if the mixing is active, one could introduce the sun.awt.AWTAccessor.ComponentAccessor.isMixingNeeded() method that would call the corresponding private method in the java.awt.Component class.
- relates to
-
JDK-6868255 Requirements for correct operating of the HW/LW Mixing feature need to be specified
- Resolved
-
JDK-7002612 REGRESSION:JApplets, JDialogs and JFrame are empty
- Closed
-
JDK-7028648 Java 3D does not display with Java 1.7
- Closed
-
JDK-7041210 REGRESSION:JTabbedPane not laying out non-visible tabs
- Closed
-
JDK-6796881 RFE: Add Java Doc requiring calls to repaint() after container.add() and container.remove()
- Open
-
JDK-7036669 Simplify revalidating component hierarchy with multiple validate roots
- Closed
-
JDK-7041823 Multiple regressions caused by the fix for #6852592
- Closed
-
JDK-6907705 fixing - #6852592: "invalidate() must be smarter" revealed problem with JTree
- Closed
-
JDK-6973780 JCK manual case JTextFieldTests.html#JTextField fails in jdk7 b100
- Closed
-
JDK-6778882 InternalFrame within glass pane goes below a heavy weight component
- Closed
-
JDK-7021116 Swing applets do not display in appletviewer unless they are resized.
- Closed
-
JDK-7027013 Regression: JComponent.revalidate() has no effect on invisible components
- Closed
-
JDK-7041387 Introduce new boolean system property java.awt.smartInvalidate
- Closed
-
JDK-6871485 Performance optimization of the HW/LW Mixing
- Closed