2362N/A * Copyright (c) 1998, 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 * This is the abstract superclass for color choosers. If you want to add 0N/A * a new color chooser panel into a <code>JColorChooser</code>, subclass 0N/A * <strong>Warning:</strong> 0N/A * Serialized objects of this class will not be compatible with 0N/A * future Swing releases. The current serialization support is 0N/A * appropriate for short term storage or RMI between applications running 0N/A * the same version of Swing. As of 1.4, support for long term storage 0N/A * of all JavaBeans<sup><font size="-2">TM</font></sup> 0N/A * has been added to the <code>java.beans</code> package. 0N/A * @author Tom Santos 0N/A * @author Steve Wilson 0N/A * Invoked automatically when the model's state changes. 0N/A * It is also called by <code>installChooserPanel</code> to allow 0N/A * you to set up the initial state of your chooser. 0N/A * Override this method to update your <code>ChooserPanel</code>. 0N/A * Builds a new chooser panel. 0N/A * Returns a string containing the display name of the panel. 0N/A * @return the name of the display panel 0N/A * Provides a hint to the look and feel as to the 0N/A * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to 0N/A * access the panel. A return value <= 0 indicates there is no mnemonic. 0N/A * The return value here is a hint, it is ultimately up to the look 0N/A * and feel to honor the return value in some meaningful way. 0N/A * This implementation returns 0, indicating the 0N/A * <code>AbstractColorChooserPanel</code> does not support a mnemonic, 0N/A * subclasses wishing a mnemonic will need to override this. 0N/A * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no 0N/A * @see #getDisplayedMnemonicIndex 0N/A * Provides a hint to the look and feel as to the index of the character in 0N/A * <code>getDisplayName</code> that should be visually identified as the 0N/A * mnemonic. The look and feel should only use this if 0N/A * <code>getMnemonic</code> returns a value > 0. 0N/A * The return value here is a hint, it is ultimately up to the look 0N/A * and feel to honor the return value in some meaningful way. For example, 0N/A * a look and feel may wish to render each 0N/A * <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>, 0N/A * and further use this return value to underline a character in 0N/A * the <code>getDisplayName</code>. 0N/A * This implementation returns -1, indicating the 0N/A * <code>AbstractColorChooserPanel</code> does not support a mnemonic, 0N/A * subclasses wishing a mnemonic will need to override this. 0N/A * @return Character index to render mnemonic for; -1 to provide no 0N/A * visual identifier for this panel. 0N/A * Returns the small display icon for the panel. 0N/A * @return the small display icon 0N/A * Returns the large display icon for the panel. 0N/A * @return the large display icon 0N/A * Invoked when the panel is added to the chooser. 0N/A * If you override this, be sure to call <code>super</code>. 0N/A * @param enclosingChooser the panel to be added 0N/A * @exception RuntimeException if the chooser panel has already been 0N/A * Invoked when the panel is removed from the chooser. 0N/A * If override this, be sure to call <code>super</code>. 0N/A * Returns the model that the chooser panel is editing. 0N/A * @return the <code>ColorSelectionModel</code> model this panel 0N/A * Returns the color that is currently selected. 0N/A * @return the <code>Color</code> that is selected 0N/A * @param g the <code>Graphics</code> object 0N/A * Returns an integer from the defaults table. If <code>key</code> does 0N/A * not map to a valid <code>Integer</code>, <code>default</code> is 0N/A * @param key an <code>Object</code> specifying the int 0N/A * @param defaultValue Returned value if <code>key</code> is not available, 0N/A * or is not an Integer