Java JRootPane makeWindowLeopardStyle(JRootPane rootPane)

Here you can find the source of makeWindowLeopardStyle(JRootPane rootPane)

Description

Makes this window a Unified window on Mac OS X Leopard or greater systems.

License

Open Source License

Parameter

Parameter Description
rootPane a parameter

Declaration

public static void makeWindowLeopardStyle(JRootPane rootPane) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.swing.JRootPane;

public class Main {
    /**/*ww  w . jav a  2s  . co  m*/
     * Makes this window a Unified window on Mac OS X Leopard or greater systems.
     *
     * @param rootPane
     */
    public static void makeWindowLeopardStyle(JRootPane rootPane) {
        // TODO figure out correct way to determine if the JRootPane has been
        // TODO realized.
        if (rootPane.isValid()) {
            throw new IllegalArgumentException(
                    "This method only works if the" + "given JRootPane has not yet been realized.");
        }

        rootPane.putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
    }
}

Related

  1. addShortcut(JRootPane rootPane, String command, Action action)
  2. closeOnEscape(final Window window, final JRootPane root)
  3. getRootPane(Window window)
  4. installEscapeBinding(final Window window, final JRootPane rootPane, final boolean dispose)
  5. isSecondaryWindow(JRootPane rp)
  6. registerEscapeAction(JRootPane pane, ActionListener l)
  7. setCancelAction(RootPaneContainer c, Action cancelAction)
  8. setEscapeAction(JRootPane pane, Action action)