jdk/src/share/classes/javax/swing/JPanel.java

Print this page

        

*** 23,39 **** * questions. */ package javax.swing; import java.awt.*; import javax.swing.plaf.*; import javax.accessibility.*; - import java.io.Serializable; import java.io.ObjectOutputStream; - import java.io.ObjectInputStream; import java.io.IOException; /** * <code>JPanel</code> is a generic lightweight container. --- 23,39 ---- * questions. */ package javax.swing; import java.awt.*; + import java.beans.JavaBean; + import java.beans.BeanProperty; import javax.swing.plaf.*; import javax.accessibility.*; import java.io.ObjectOutputStream; import java.io.IOException; /** * <code>JPanel</code> is a generic lightweight container.
*** 54,70 **** * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * - * @beaninfo - * description: A generic lightweight container. - * * @author Arnaud Weber * @author Steve Wilson * @since 1.2 */ @SuppressWarnings("serial") // Same-version serialization only public class JPanel extends JComponent implements Accessible { /** * @see #getUIClassID --- 54,68 ---- * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author Arnaud Weber * @author Steve Wilson * @since 1.2 */ + @JavaBean(defaultProperty = "UI", description = "A generic lightweight container.") @SuppressWarnings("serial") // Same-version serialization only public class JPanel extends JComponent implements Accessible { /** * @see #getUIClassID
*** 143,158 **** * Sets the look and feel (L&amp;F) object that renders this component. * * @param ui the PanelUI L&amp;F object * @see UIDefaults#getUI * @since 1.4 - * @beaninfo - * bound: true - * hidden: true - * attribute: visualUpdate true - * description: The UI object that implements the Component's LookAndFeel. */ public void setUI(PanelUI ui) { super.setUI(ui); } /** --- 141,153 ---- * Sets the look and feel (L&amp;F) object that renders this component. * * @param ui the PanelUI L&amp;F object * @see UIDefaults#getUI * @since 1.4 */ + @BeanProperty(hidden = true, visualUpdate = true, description + = "The UI object that implements the Component's LookAndFeel.") public void setUI(PanelUI ui) { super.setUI(ui); } /**
*** 160,173 **** * that renders this component. * * @return "PanelUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI - * @beaninfo - * expert: true - * description: A string that specifies the name of the L&amp;F class. */ public String getUIClassID() { return uiClassID; } --- 155,167 ---- * that renders this component. * * @return "PanelUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI */ + @BeanProperty(bound = false, expert = true, description + = "A string that specifies the name of the L&amp;F class.") public String getUIClassID() { return uiClassID; }
*** 211,220 **** --- 205,215 ---- * A new AccessibleJPanel instance is created if necessary. * * @return an AccessibleJPanel that serves as the * AccessibleContext of this JPanel */ + @BeanProperty(bound = false) public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJPanel(); } return accessibleContext;