JCheckBox.java revision 0
3149N/A * Copyright 1997-2006 Sun Microsystems, Inc. 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 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun 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, 1472N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 1879N/A * An implementation of a check box -- an item that can be selected or 1879N/A * deselected, and which displays its state to the user. 1879N/A * By convention, any number of check boxes in a group can be selected. 1879N/A * in <em>The Java Tutorial</em> 1879N/A * for examples and information on using check boxes. 1879N/A * Buttons can be configured, and to some degree controlled, by 1879N/A * <code>Action</code> with a button has many benefits beyond directly 1879N/A * Swing Components Supporting <code>Action</code></a> for more 1879N/A * details, and you can find more information in <a 1879N/A * to Use Actions</a>, a section in <em>The Java Tutorial</em>. 1879N/A * <strong>Warning:</strong> Swing is not thread safe. For more 1879N/A * <strong>Warning:</strong> 1879N/A * Serialized objects of this class will not be compatible with 1879N/A * future Swing releases. The current serialization support is 1879N/A * appropriate for short term storage or RMI between applications running 1879N/A * the same version of Swing. As of 1.4, support for long term storage 1879N/A * of all JavaBeans<sup><font size="-2">TM</font></sup> 1879N/A * has been added to the <code>java.beans</code> package. 1879N/A * attribute: isContainer false 1879N/A * description: A component which can be selected or deselected. 1879N/A /** Identifies a change to the flat property. */ 2062N/A * Creates an initially unselected check box button with no text, no icon. 2772N/A * Creates an initially unselected check box with an icon. 1879N/A * @param icon the Icon image to display 1879N/A * Creates a check box with an icon and specifies whether 1879N/A * or not it is initially selected. 1879N/A * @param icon the Icon image to display 1879N/A * @param selected a boolean value indicating the initial selection 1879N/A * state. If <code>true</code> the check box is selected 2073N/A * Creates an initially unselected check box with text. 2073N/A * @param text the text of the check box. 1879N/A * Creates a check box where properties are taken from the 1879N/A * Creates a check box with text and specifies whether 1879N/A * or not it is initially selected. 1879N/A * @param text the text of the check box. 1879N/A * @param selected a boolean value indicating the initial selection 1879N/A * state. If <code>true</code> the check box is selected 1879N/A * Creates an initially unselected check box with 1879N/A * the specified text and icon. 2073N/A * @param text the text of the check box. 2073N/A * @param icon the Icon image to display 2796N/A * Creates a check box with text and icon, 2796N/A * and specifies whether or not it is initially selected. 2796N/A * @param text the text of the check box. 1879N/A * @param icon the Icon image to display 1879N/A * @param selected a boolean value indicating the initial selection 1879N/A * state. If <code>true</code> the check box is selected 1879N/A * Sets the <code>borderPaintedFlat</code> property, 1879N/A * which gives a hint to the look and feel as to the 1879N/A * appearance of the check box border. 1879N/A * This is usually set to <code>true</code> when a 1879N/A * <code>JCheckBox</code> instance is used as a 2808N/A * renderer in a component such as a <code>JTable</code> or 1879N/A * <code>JTree</code>. The default value for the 1879N/A * <code>borderPaintedFlat</code> property is <code>false</code>. 2772N/A * This method fires a property changed event. 2772N/A * Some look and feels might not implement flat borders; 2772N/A * they will ignore this property. 2772N/A * @param b <code>true</code> requests that the border be painted flat; 2772N/A * <code>false</code> requests normal borders 2772N/A * @see #isBorderPaintedFlat 1879N/A * attribute: visualUpdate true 2772N/A * description: Whether the border is painted flat. 1879N/A * Gets the value of the <code>borderPaintedFlat</code> property. 1879N/A * @return the value of the <code>borderPaintedFlat</code> property 1879N/A * @see #setBorderPaintedFlat 1879N/A * Resets the UI property to a value from the current look and feel. 0N/A * @see JComponent#updateUI 0N/A * Returns a string that specifies the name of the L&F class 0N/A * that renders this component. 0N/A * @return the string "CheckBoxUI" 0N/A * @see JComponent#getUIClassID 0N/A * @see UIDefaults#getUI 0N/A * description: A string that specifies the name of the L&F class 0N/A * The icon for checkboxs comes from the look and feel, 0N/A * not the Action; this is overriden to do nothing. 0N/A * See readObject and writeObject in JComponent for more 0N/A * information about serialization in Swing. 113N/A * See JComponent.readObject() for information about serialization 1837N/A * Returns a string representation of this JCheckBox. This method 113N/A * is intended to be used only for debugging purposes, and the 113N/A * content and format of the returned string may vary between 0N/A * implementations. The returned string may be empty but may not 0N/A * be <code>null</code>. 0N/A * specific new aspects of the JFC components. 0N/A * @return a string representation of this JCheckBox. 0N/A// Accessibility support 0N/A * Gets the AccessibleContext associated with this JCheckBox. 0N/A * For JCheckBoxes, the AccessibleContext takes the form of an 0N/A * A new AccessibleJCheckBox instance is created if necessary. 0N/A * @return an AccessibleJCheckBox that serves as the 0N/A * AccessibleContext of this JCheckBox 0N/A * description: The AccessibleContext associated with this CheckBox. 0N/A * This class implements accessibility support for the 0N/A * <code>JCheckBox</code> class. It provides an implementation of the 0N/A * Java Accessibility API appropriate to check box user-interface 0N/A * <strong>Warning:</strong> 2772N/A * Serialized objects of this class will not be compatible with 2772N/A * future Swing releases. The current serialization support is 2772N/A * appropriate for short term storage or RMI between applications running 2772N/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 * Get the role of this object. 0N/A * @return an instance of AccessibleRole describing the role of the object 0N/A * @see AccessibleRole 0N/A }
// inner class AccessibleJCheckBox