src/java.desktop/share/classes/javax/swing/JPanel.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 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™
* 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™
* 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&F) object that renders this component.
*
* @param ui the PanelUI L&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&F) object that renders this component.
*
* @param ui the PanelUI L&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&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&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;