2362N/A * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Class that manages a JLF awt.Window-descendant class's title bar. 0N/A * This class assumes it will be created with a particular window 0N/A * decoration style, and that if the style changes, a new one will 0N/A * @author Terry Kellerman 0N/A * PropertyChangeListener added to the JRootPane. 0N/A * JMenuBar, typically renders the system menu items. 0N/A * Action used to close the Window. 0N/A * Action used to iconify the Frame. 0N/A * Action to restore the Frame size. 0N/A * Action to restore the Frame size. 0N/A * Button used to maximize or restore the Frame. 0N/A * Button used to maximize or restore the Frame. 0N/A * Button used to maximize or restore the Frame. 0N/A * Icon used for toggleButton when window is normal size. 0N/A * Icon used for toggleButton when window is maximized. 0N/A * Image used for the system menu icon 0N/A * Listens for changes in the state of the Window listener to update 0N/A * the state of the widgets. 0N/A * Window we're currently in. 0N/A * JRootPane rendering for. 0N/A * Room remaining in title for bumps. 0N/A * Buffered Frame.state property. As state isn't bound, this is kept 0N/A * to determine when to avoid updating widgets. 0N/A * MetalRootPaneUI that created us. 0N/A * Uninstalls the necessary state. 0N/A * Installs the necessary listeners. 0N/A * Uninstalls the necessary listeners. 0N/A * Returns the <code>WindowListener</code> to add to the 0N/A * <code>Window</code>. 0N/A * Returns the <code>PropertyChangeListener</code> to install on 0N/A * the <code>Window</code>. 0N/A * Returns the <code>JRootPane</code> this was created for. 0N/A * Returns the decoration style of the <code>JRootPane</code>. 0N/A * Adds any sub-Components contained in the <code>MetalTitlePane</code>. 0N/A * Determines the Colors to draw with. 0N/A "OptionPane.errorDialog.titlePane.background");
0N/A "OptionPane.errorDialog.titlePane.foreground");
0N/A "OptionPane.errorDialog.titlePane.shadow");
0N/A "OptionPane.questionDialog.titlePane.background");
0N/A "OptionPane.questionDialog.titlePane.foreground");
0N/A "OptionPane.questionDialog.titlePane.shadow");
0N/A "OptionPane.warningDialog.titlePane.background");
0N/A "OptionPane.warningDialog.titlePane.foreground");
0N/A "OptionPane.warningDialog.titlePane.shadow");
0N/A * Installs the fonts and necessary properties on the MetalTitlePane. 0N/A * Uninstalls any previously installed UI values. 0N/A * Returns the <code>JMenuBar</code> displaying the appropriate 0N/A * system menu items. 0N/A * Closes the Window. 0N/A * Iconifies the Frame. 0N/A * Maximizes the Frame. 0N/A * Restores the Frame size. 0N/A * Create the <code>Action</code>s that get associated with the 0N/A * buttons and menu items. 0N/A * Returns the <code>JMenu</code> displaying the appropriate menu items 0N/A * for manipulating the Frame. 0N/A * Adds the necessary <code>JMenuItem</code>s to the passed in menu. 0N/A * Returns a <code>JButton</code> appropriate for placement on the 0N/A * Creates the Buttons that will be placed on the TitlePane. 0N/A * Returns the <code>LayoutManager</code> that should be installed on 0N/A * the <code>MetalTitlePane</code>. 0N/A * Updates state dependant upon the Window's active state. 0N/A // Repaint the whole thing as the Borders that are used have 0N/A // different colors for active vs inactive 0N/A * Sets the state of the Window. 0N/A * Sets the state of the window. If <code>updateRegardless</code> is 0N/A * true and the state has not changed, this will update anyway. 0N/A // This is a croak, if state becomes bound, this can 0N/A // Not contained in a Frame 0N/A * Updates the toggle button to contain the Icon <code>icon</code>, and 0N/A * Action <code>action</code>. 0N/A * Returns the Frame rendering in. This will return null if the 0N/A * <code>JRootPane</code> is not contained in a <code>Frame</code>. 0N/A * Returns the <code>Window</code> the <code>JRootPane</code> is 0N/A * contained in. This will return null if there is no parent ancestor 0N/A * of the <code>JRootPane</code>. 0N/A * Returns the String to display as the title. 0N/A * Renders the TitlePane. 0N/A // As state isn't bound, we need a convenience place to check 0N/A // if it has changed. Changing the state typically changes the 0N/A * Actions used to <code>close</code> the <code>Window</code>. 0N/A * Actions used to <code>iconfiy</code> the <code>Frame</code>. 0N/A * Actions used to <code>restore</code> the <code>Frame</code>. 0N/A * Actions used to <code>restore</code> the <code>Frame</code>. 0N/A * Class responsible for drawing the system menu. Looks up the 0N/A * image to draw from the Frame associated with the 0N/A * <code>JRootPane</code>. 0N/A // assumes all buttons have the same dimensions 0N/A // these dimensions include the borders 0N/A * PropertyChangeListener installed on the Window. Updates the necessary 0N/A * state as the state of the Window changes. 0N/A // Frame.state isn't currently bound. 0N/A else if (
"componentOrientation" ==
name) {
0N/A * Update the image used for the system icon 0N/A * WindowListener installed on the Window, updates the state as necessary.