src/share/classes/javax/swing/JRootPane.java

Print this page




 708 
 709     /**
 710      * Returns the current glass pane for this <code>JRootPane</code>.
 711      * @return the current glass pane
 712      * @see #setGlassPane
 713      */
 714     public Component getGlassPane() {
 715         return glassPane;
 716     }
 717 
 718     /**
 719      * If a descendant of this <code>JRootPane</code> calls
 720      * <code>revalidate</code>, validate from here on down.
 721      *<p>
 722      * Deferred requests to layout a component and its descendents again.
 723      * For example, calls to <code>revalidate</code>, are pushed upwards to
 724      * either a <code>JRootPane</code> or a <code>JScrollPane</code>
 725      * because both classes override <code>isValidateRoot</code> to return true.
 726      *
 727      * @see JComponent#isValidateRoot

 728      * @return true
 729      */

 730     public boolean isValidateRoot() {
 731         return true;
 732     }
 733 
 734     /**
 735      * The <code>glassPane</code> and <code>contentPane</code>
 736      * have the same bounds, which means <code>JRootPane</code>
 737      * does not tiles its children and this should return false.
 738      * On the other hand, the <code>glassPane</code>
 739      * is normally not visible, and so this can return true if the
 740      * <code>glassPane</code> isn't visible. Therefore, the
 741      * return value here depends upon the visiblity of the
 742      * <code>glassPane</code>.
 743      *
 744      * @return true if this component's children don't overlap
 745      */
 746     public boolean isOptimizedDrawingEnabled() {
 747         return !glassPane.isVisible();
 748     }
 749 




 708 
 709     /**
 710      * Returns the current glass pane for this <code>JRootPane</code>.
 711      * @return the current glass pane
 712      * @see #setGlassPane
 713      */
 714     public Component getGlassPane() {
 715         return glassPane;
 716     }
 717 
 718     /**
 719      * If a descendant of this <code>JRootPane</code> calls
 720      * <code>revalidate</code>, validate from here on down.
 721      *<p>
 722      * Deferred requests to layout a component and its descendents again.
 723      * For example, calls to <code>revalidate</code>, are pushed upwards to
 724      * either a <code>JRootPane</code> or a <code>JScrollPane</code>
 725      * because both classes override <code>isValidateRoot</code> to return true.
 726      *
 727      * @see JComponent#isValidateRoot
 728      * @see java.awt.Container#isValidateRoot
 729      * @return true
 730      */
 731     @Override
 732     public boolean isValidateRoot() {
 733         return true;
 734     }
 735 
 736     /**
 737      * The <code>glassPane</code> and <code>contentPane</code>
 738      * have the same bounds, which means <code>JRootPane</code>
 739      * does not tiles its children and this should return false.
 740      * On the other hand, the <code>glassPane</code>
 741      * is normally not visible, and so this can return true if the
 742      * <code>glassPane</code> isn't visible. Therefore, the
 743      * return value here depends upon the visiblity of the
 744      * <code>glassPane</code>.
 745      *
 746      * @return true if this component's children don't overlap
 747      */
 748     public boolean isOptimizedDrawingEnabled() {
 749         return !glassPane.isVisible();
 750     }
 751