< prev index next >

src/java.desktop/share/classes/javax/swing/JDialog.java

Print this page




 832      * Calls {@code paint(g)}.  This method was overridden to
 833      * prevent an unnecessary call to clear the background.
 834      *
 835      * @param g  the {@code Graphics} context in which to paint
 836      */
 837     public void update(Graphics g) {
 838         paint(g);
 839     }
 840 
 841    /**
 842     * Sets the menubar for this dialog.
 843     *
 844     * @param menu the menubar being placed in the dialog
 845     *
 846     * @see #getJMenuBar
 847     *
 848     * @beaninfo
 849     *      hidden: true
 850     * description: The menubar for accessing pulldown menus from this dialog.
 851     */

 852     public void setJMenuBar(JMenuBar menu) {
 853         getRootPane().setMenuBar(menu);
 854     }
 855 
 856    /**
 857     * Returns the menubar set on this dialog.
 858     *
 859     * @return the menubar set on this dialog
 860     * @see #setJMenuBar
 861     */

 862     public JMenuBar getJMenuBar() {
 863         return getRootPane().getMenuBar();
 864     }
 865 
 866 
 867     /**
 868      * Returns whether calls to {@code add} and
 869      * {@code setLayout} are forwarded to the {@code contentPane}.
 870      *
 871      * @return true if {@code add} and {@code setLayout}
 872      *         are forwarded; false otherwise
 873      *
 874      * @see #addImpl
 875      * @see #setLayout
 876      * @see #setRootPaneCheckingEnabled
 877      * @see javax.swing.RootPaneContainer
 878      */
 879     protected boolean isRootPaneCheckingEnabled() {
 880         return rootPaneCheckingEnabled;
 881     }




 832      * Calls {@code paint(g)}.  This method was overridden to
 833      * prevent an unnecessary call to clear the background.
 834      *
 835      * @param g  the {@code Graphics} context in which to paint
 836      */
 837     public void update(Graphics g) {
 838         paint(g);
 839     }
 840 
 841    /**
 842     * Sets the menubar for this dialog.
 843     *
 844     * @param menu the menubar being placed in the dialog
 845     *
 846     * @see #getJMenuBar
 847     *
 848     * @beaninfo
 849     *      hidden: true
 850     * description: The menubar for accessing pulldown menus from this dialog.
 851     */
 852     @SuppressWarnings("deprecation")
 853     public void setJMenuBar(JMenuBar menu) {
 854         getRootPane().setMenuBar(menu);
 855     }
 856 
 857    /**
 858     * Returns the menubar set on this dialog.
 859     *
 860     * @return the menubar set on this dialog
 861     * @see #setJMenuBar
 862     */
 863     @SuppressWarnings("deprecation")
 864     public JMenuBar getJMenuBar() {
 865         return getRootPane().getMenuBar();
 866     }
 867 
 868 
 869     /**
 870      * Returns whether calls to {@code add} and
 871      * {@code setLayout} are forwarded to the {@code contentPane}.
 872      *
 873      * @return true if {@code add} and {@code setLayout}
 874      *         are forwarded; false otherwise
 875      *
 876      * @see #addImpl
 877      * @see #setLayout
 878      * @see #setRootPaneCheckingEnabled
 879      * @see javax.swing.RootPaneContainer
 880      */
 881     protected boolean isRootPaneCheckingEnabled() {
 882         return rootPaneCheckingEnabled;
 883     }


< prev index next >