2362N/A * Copyright (c) 1997, 2008, 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 * A Basic L&F implementation of ToolBarUI. This implementation 0N/A * @author Georges Saab 0N/A * @author Jeff Shapiro 0N/A // Rollover button implementation. 0N/A * As of Java 2 platform v1.3 this previously undocumented field is no 0N/A * Key bindings are now defined by the LookAndFeel, please refer to 0N/A * the key bindings specification for further details. 0N/A * @deprecated As of Java 2 platform v1.3. 0N/A * As of Java 2 platform v1.3 this previously undocumented field is no 0N/A * Key bindings are now defined by the LookAndFeel, please refer to 0N/A * the key bindings specification for further details. 0N/A * @deprecated As of Java 2 platform v1.3. 0N/A * As of Java 2 platform v1.3 this previously undocumented field is no 0N/A * Key bindings are now defined by the LookAndFeel, please refer to 0N/A * the key bindings specification for further details. 0N/A * @deprecated As of Java 2 platform v1.3. 0N/A * As of Java 2 platform v1.3 this previously undocumented field is no 0N/A * Key bindings are now defined by the LookAndFeel, please refer to 0N/A * the key bindings specification for further details. 0N/A * @deprecated As of Java 2 platform v1.3. 0N/A // Initialize instance vars 0N/A // Clear instance vars 0N/A "ToolBar.background",
0N/A "ToolBar.foreground",
0N/A // Toolbar specific defaults 0N/A // ToolBar rollover button borders 0N/A // Put focus listener on all components in toolbar 0N/A // Remove focus listener from all components in toolbar 0N/A "ToolBar.actionMap");
0N/A "ToolBar.ancestorInputMap");
0N/A * Creates a rollover border for toolbar components. The 0N/A * rollover border will be installed if rollover borders are 0N/A * Override this method to provide an alternate rollover border. 0N/A * Creates the non rollover border for toolbar components. This 0N/A * border will be installed as the border for components added 0N/A * to the toolbar if rollover borders are not enabled. 0N/A * Override this method to provide an alternate rollover border. 0N/A * Creates a non rollover border for Toggle buttons in the toolbar. 0N/A * No longer used, use BasicToolBarUI.createFloatingWindow(JToolBar) 0N/A * @see #createFloatingWindow 0N/A // Override createRootPane() to automatically resize 0N/A // the frame when contents change 0N/A * Creates a window which contains the toolbar after it has been 0N/A * dragged out from its container 0N/A * @return a <code>RootPaneContainer</code> object, containing the toolbar. 0N/A // Override createRootPane() to automatically resize 0N/A // the frame when contents change 0N/A * Returns a flag to determine whether rollover button borders 0N/A * @return true if rollover borders are enabled; false otherwise 0N/A * @see #setRolloverBorders 0N/A * Sets the flag for enabling rollover borders on the toolbar and it will 0N/A * also install the apropriate border depending on the state of the flag. 0N/A * @param rollover if true, rollover borders are installed. 0N/A * Otherwise non-rollover borders are installed 0N/A * @see #isRolloverBorders 0N/A * Installs rollover borders on all the child components of the JComponent. 0N/A * This is a convenience method to call <code>setBorderToRollover</code> 0N/A * for each child component. 0N/A * @param c container which holds the child components (usally a JToolBar) 0N/A * @see #setBorderToRollover 0N/A // Put rollover borders on buttons 0N/A * Installs non-rollover borders on all the child components of the JComponent. 0N/A * A non-rollover border is the border that is installed on the child component 0N/A * while it is in the toolbar. 0N/A * This is a convenience method to call <code>setBorderToNonRollover</code> 0N/A * for each child component. 0N/A * @param c container which holds the child components (usally a JToolBar) 0N/A * @see #setBorderToNonRollover 0N/A // Put non-rollover borders on buttons. These borders reduce the margin. 0N/A * Installs normal borders on all the child components of the JComponent. 0N/A * A normal border is the original border that was installed on the child 0N/A * component before it was added to the toolbar. 0N/A * This is a convenience method to call <code>setBorderNormal</code> 0N/A * for each child component. 0N/A * @param c container which holds the child components (usally a JToolBar) 0N/A * @see #setBorderToNonRollover 0N/A // Put back the normal borders on buttons 0N/A * Sets the border of the component to have a rollover border which 1999N/A * was created by the {@link #createRolloverBorder} method. 0N/A * @param c component which will have a rollover border installed 0N/A * @see #createRolloverBorder 0N/A // Only set the border if its the default border 0N/A * Returns a rollover border for the button. 0N/A * @param b the button to calculate the rollover border for 0N/A * @return the rollover border 0N/A * @see #setBorderToRollover 0N/A * Sets the border of the component to have a non-rollover border which 1999N/A * was created by the {@link #createNonRolloverBorder} method. 0N/A * @param c component which will have a non-rollover border installed 0N/A * @see #createNonRolloverBorder 0N/A // Only set the border if its the default border 0N/A * Returns a non-rollover border for the button. 0N/A * @param b the button to calculate the non-rollover border for 0N/A * @return the non-rollover border 0N/A * @see #setBorderToNonRollover 0N/A * Sets the border of the component to have a normal border. 0N/A * A normal border is the original border that was installed on the child 0N/A * component before it was added to the toolbar. 0N/A * @param c component which will have a normal border re-installed 0N/A * @see #createNonRolloverBorder 0N/A * Gets the color displayed when over a docking area 0N/A * Sets the color displayed when over a docking area 0N/A * Gets the color displayed when over a floating area 0N/A * Sets the color displayed when over a floating area 0N/A // North (Base distance on height for now!) 0N/A // East (Base distance on height for now!) 0N/A // West (Base distance on height for now!) 0N/A * Paints the contents of the window used for dragging. 0N/A * @param g Graphics to paint to. 0N/A * @throws NullPointerException is <code>g</code> is null 0N/A // ContainerListener 0N/A // Revert the button border 0N/A // MouseInputListener (DockingListener) 0N/A // PropertyChangeListener 0N/A // Search for JSeparator components and change it's orientation 0N/A // to match the toolbar and flip it's orientation. 0N/A // Flip the orientation. 0N/A // NOTE: This class exists only for backward compatability. All 0N/A // its functionality has been moved into Handler. If you need to add 0N/A // new functionality add it to the Handler, but make sure this 0N/A // class calls into the Handler. 0N/A // NOTE: This class exists only for backward compatability. All 0N/A // its functionality has been moved into Handler. If you need to add 0N/A // new functionality add it to the Handler, but make sure this 0N/A // class calls into the Handler. 0N/A // NOTE: This class exists only for backward compatability. All 0N/A // its functionality has been moved into Handler. If you need to add 0N/A // new functionality add it to the Handler, but make sure this 0N/A // class calls into the Handler. 0N/A * This class should be treated as a "protected" inner class. 0N/A * Instantiate it only within subclasses of BasicToolBarUI. 0N/A // NOTE: This class exists only for backward compatability. All 0N/A // its functionality has been moved into Handler. If you need to add 0N/A // new functionality add it to the Handler, but make sure this 0N/A // class calls into the Handler. 0N/A * Returns the orientation of the toolbar window when the toolbar is 0N/A * floating. The orientation is either one of <code>JToolBar.HORIZONTAL</code> 0N/A * or <code>JToolBar.VERTICAL</code>. 0N/A * @return the orientation of the toolbar window 0N/A // Paint the children