--- old/jdk/src/share/classes/javax/swing/JInternalFrame.java 2014-08-11 11:50:02.404790700 +0400
+++ new/jdk/src/share/classes/javax/swing/JInternalFrame.java 2014-08-11 11:50:01.983766600 +0400
@@ -22,13 +22,15 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-
package javax.swing;
import java.awt.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
import java.beans.PropertyVetoException;
import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
@@ -39,11 +41,10 @@
import java.io.ObjectOutputStream;
import java.io.IOException;
import java.lang.StringBuilder;
-import java.beans.PropertyChangeListener;
+
import sun.awt.AppContext;
import sun.swing.SwingUtilities2;
-
/**
* A lightweight object that provides many of the features of
* a native frame, including dragging, closing, becoming an icon,
@@ -105,12 +106,9 @@
* @author David Kloba
* @author Rich Schiavi
* @since 1.2
- * @beaninfo
- * attribute: isContainer true
- * attribute: containerDelegate getContentPane
- * description: A frame container which is contained within
- * another window.
*/
+@JavaBean(defaultProperty = "JMenuBar", description = "A frame container which is contained within another window.")
+@SwingContainer(delegate = "getContentPane")
@SuppressWarnings("serial") // Same-version serialization only
public class JInternalFrame extends JComponent implements
Accessible, WindowConstants,
@@ -378,12 +376,9 @@
/**
* Sets the UI delegate for this JInternalFrame
.
* @param ui the UI delegate
- * @beaninfo
- * bound: true
- * hidden: true
- * attribute: visualUpdate true
- * description: The UI object that implements the Component's LookAndFeel.
*/
+ @BeanProperty(hidden = true, visualUpdate = true, description
+ = "The UI object that implements the Component's LookAndFeel.")
public void setUI(InternalFrameUI ui) {
boolean checkingEnabled = isRootPaneCheckingEnabled();
try {
@@ -435,10 +430,9 @@
*
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
- *
- * @beaninfo
- * description: UIClassID
*/
+ @BeanProperty(bound = false, description
+ = "UIClassID")
public String getUIClassID() {
return uiClassID;
}
@@ -471,10 +465,9 @@
* @see #setLayout
* @see #isRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer
- * @beaninfo
- * hidden: true
- * description: Whether the add and setLayout methods are forwarded
*/
+ @BeanProperty(hidden = true, description
+ = "Whether the add and setLayout methods are forwarded")
protected void setRootPaneCheckingEnabled(boolean enabled) {
rootPaneCheckingEnabled = enabled;
}
@@ -596,12 +589,9 @@
*
* @param m the JMenuBar
to use in this internal frame
* @see #getJMenuBar
- * @beaninfo
- * bound: true
- * preferred: true
- * description: The menu bar for accessing pulldown menus
- * from this internal frame.
*/
+ @BeanProperty(preferred = true, description
+ = "The menu bar for accessing pulldown menus from this internal frame.")
public void setJMenuBar(JMenuBar m){
JMenuBar oldValue = getMenuBar();
getRootPane().setJMenuBar(m);
@@ -627,12 +617,9 @@
* @exception java.awt.IllegalComponentStateException (a runtime
* exception) if the content pane parameter is null
* @see RootPaneContainer#getContentPane
- * @beaninfo
- * bound: true
- * hidden: true
- * description: The client area of the internal frame where child
- * components are normally inserted.
*/
+ @BeanProperty(hidden = true, description
+ = "The client area of the internal frame where child components are normally inserted.")
public void setContentPane(Container c) {
Container oldValue = getContentPane();
getRootPane().setContentPane(c);
@@ -659,11 +646,9 @@
* @exception java.awt.IllegalComponentStateException (a runtime
* exception) if the layered pane parameter is null
* @see RootPaneContainer#setLayeredPane
- * @beaninfo
- * hidden: true
- * bound: true
- * description: The pane which holds the various desktop layers.
*/
+ @BeanProperty(hidden = true, description
+ = "The pane which holds the various desktop layers.")
public void setLayeredPane(JLayeredPane layered) {
JLayeredPane oldValue = getLayeredPane();
getRootPane().setLayeredPane(layered);
@@ -686,11 +671,9 @@
*
* @param glass the glass pane for this internal frame
* @see RootPaneContainer#getGlassPane
- * @beaninfo
- * bound: true
- * hidden: true
- * description: A transparent pane used for menu rendering.
*/
+ @BeanProperty(hidden = true, description
+ = "A transparent pane used for menu rendering.")
public void setGlassPane(Component glass) {
Component oldValue = getGlassPane();
getRootPane().setGlassPane(glass);
@@ -703,6 +686,8 @@
* @return the rootPane
property
* @see RootPaneContainer#getRootPane
*/
+ @BeanProperty(hidden = true, description
+ = "The root pane used by this internal frame.")
public JRootPane getRootPane() {
return rootPane;
}
@@ -714,10 +699,6 @@
* This method is called by the constructor.
*
* @param root the new JRootPane
object
- * @beaninfo
- * bound: true
- * hidden: true
- * description: The root pane used by this internal frame.
*/
protected void setRootPane(JRootPane root) {
if(rootPane != null) {
@@ -742,11 +723,9 @@
* Sets whether this JInternalFrame
can be closed by
* some user action.
* @param b a boolean value, where true
means this internal frame can be closed
- * @beaninfo
- * preferred: true
- * bound: true
- * description: Indicates whether this internal frame can be closed.
*/
+ @BeanProperty(preferred = true, description
+ = "Indicates whether this internal frame can be closed.")
public void setClosable(boolean b) {
Boolean oldValue = closable ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -808,12 +787,9 @@
* @see #setDefaultCloseOperation
* @see #dispose
* @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSING
- *
- * @beaninfo
- * bound: true
- * constrained: true
- * description: Indicates whether this internal frame has been closed.
*/
+ @BeanProperty(description
+ = "Indicates whether this internal frame has been closed.")
public void setClosed(boolean b) throws PropertyVetoException {
if (isClosed == b) {
return;
@@ -845,12 +821,9 @@
* user action.
*
* @param b a boolean, where true
means this internal frame can be resized
- * @beaninfo
- * preferred: true
- * bound: true
- * description: Determines whether this internal frame can be resized
- * by the user.
*/
+ @BeanProperty(preferred = true, description
+ = "Determines whether this internal frame can be resized by the user.")
public void setResizable(boolean b) {
Boolean oldValue = resizable ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -878,11 +851,9 @@
* they will ignore this property.
*
* @param b a boolean, where true
means this internal frame can be iconified
- * @beaninfo
- * preferred: true
- bound: true
- * description: Determines whether this internal frame can be iconified.
*/
+ @BeanProperty(preferred = true, description
+ = "Determines whether this internal frame can be iconified.")
public void setIconifiable(boolean b) {
Boolean oldValue = iconable ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -926,12 +897,9 @@
*
* @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED
* @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED
- *
- * @beaninfo
- * bound: true
- * constrained: true
- * description: The image displayed when this internal frame is minimized.
*/
+ @BeanProperty(description
+ = "The image displayed when this internal frame is minimized.")
public void setIcon(boolean b) throws PropertyVetoException {
if (isIcon == b) {
return;
@@ -965,11 +933,9 @@
* they will ignore this property.
*
* @param b true
to specify that this internal frame should be maximizable; false
to specify that it should not be
- * @beaninfo
- * bound: true
- * preferred: true
- * description: Determines whether this internal frame can be maximized.
*/
+ @BeanProperty(preferred = true, description
+ = "Determines whether this internal frame can be maximized.")
public void setMaximizable(boolean b) {
Boolean oldValue = maximizable ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -1007,11 +973,9 @@
* restores it
* @exception PropertyVetoException when the attempt to set the
* property is vetoed by the JInternalFrame
- * @beaninfo
- * bound: true
- * constrained: true
- * description: Indicates whether this internal frame is maximized.
*/
+ @BeanProperty(description
+ = "Indicates whether this internal frame is maximized.")
public void setMaximum(boolean b) throws PropertyVetoException {
if (isMaximum == b) {
return;
@@ -1043,11 +1007,9 @@
* @see #getTitle
*
* @param title the String
to display in the title bar
- * @beaninfo
- * preferred: true
- * bound: true
- * description: The text displayed in the title bar.
*/
+ @BeanProperty(preferred = true, description
+ = "The text displayed in the title bar.")
public void setTitle(String title) {
String oldValue = this.title;
this.title = title;
@@ -1077,13 +1039,9 @@
* @see #isShowing
* @see InternalFrameEvent#INTERNAL_FRAME_ACTIVATED
* @see InternalFrameEvent#INTERNAL_FRAME_DEACTIVATED
- *
- * @beaninfo
- * constrained: true
- * bound: true
- * description: Indicates whether this internal frame is currently
- * the active frame.
*/
+ @BeanProperty(description
+ = "Indicates whether this internal frame is currently the active frame.")
public void setSelected(boolean selected) throws PropertyVetoException {
// The InternalFrame may already be selected, but the focus
// may be outside it, so restore the focus to the subcomponent
@@ -1153,10 +1111,9 @@
*
* @param icon the Icon
to display in the title bar
* @see #getFrameIcon
- * @beaninfo
- * bound: true
- * description: The icon shown in the top-left corner of this internal frame.
*/
+ @BeanProperty(description
+ = "The icon shown in the top-left corner of this internal frame.")
public void setFrameIcon(Icon icon) {
Icon oldIcon = frameIcon;
frameIcon = icon;
@@ -1214,6 +1171,7 @@
* @return the last non-resizable Cursor
* @since 1.6
*/
+ @BeanProperty(bound = false)
public Cursor getLastCursor() {
return lastCursor;
}
@@ -1248,10 +1206,9 @@
* @param layer an Integer
object specifying this
* frame's desktop layer
* @see JLayeredPane
- * @beaninfo
- * expert: true
- * description: Specifies what desktop layer is used.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "Specifies what desktop layer is used.")
public void setLayer(Integer layer) {
if(getParent() != null && getParent() instanceof JLayeredPane) {
// Normally we want to do this, as it causes the LayeredPane
@@ -1279,10 +1236,9 @@
*
* @see #setLayer(Integer)
* @see JLayeredPane
- * @beaninfo
- * expert: true
- * description: Specifies what desktop layer is used.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "Specifies what desktop layer is used.")
public void setLayer(int layer) {
this.setLayer(Integer.valueOf(layer));
}
@@ -1306,6 +1262,7 @@
* @return the JDesktopPane
this internal frame belongs to,
* or null
if none is found
*/
+ @BeanProperty(bound = false)
public JDesktopPane getDesktopPane() {
Container p;
@@ -1330,10 +1287,9 @@
*
* @param d the JDesktopIcon
to display on the desktop
* @see #getDesktopIcon
- * @beaninfo
- * bound: true
- * description: The icon shown when this internal frame is minimized.
*/
+ @BeanProperty(description
+ = "The icon shown when this internal frame is minimized.")
public void setDesktopIcon(JDesktopIcon d) {
JDesktopIcon oldValue = getDesktopIcon();
desktopIcon = d;
@@ -1423,6 +1379,7 @@
* @see #isSelected
* @since 1.4
*/
+ @BeanProperty(bound = false)
public Component getMostRecentFocusOwner() {
if (isSelected()) {
return getFocusOwner();
@@ -1536,6 +1493,7 @@
*
* @see #addInternalFrameListener
*/
+ @BeanProperty(bound = false)
public InternalFrameListener[] getInternalFrameListeners() {
return listenerList.getListeners(InternalFrameListener.class);
}
@@ -1867,6 +1825,7 @@
* @see java.awt.Container#isFocusCycleRoot()
* @since 1.4
*/
+ @BeanProperty(bound = false)
public final Container getFocusCycleRootAncestor() {
return null;
}
@@ -1879,6 +1838,7 @@
* @return null
* @see java.awt.Window#getWarningString
*/
+ @BeanProperty(bound = false)
public final String getWarningString() {
return null;
}
@@ -2014,6 +1974,7 @@
* JInternalFrame
* @see AccessibleJInternalFrame
*/
+ @BeanProperty(bound = false)
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJInternalFrame();