--- old/jdk/src/share/classes/javax/swing/JOptionPane.java 2014-08-11 11:50:21.562886400 +0400 +++ new/jdk/src/share/classes/javax/swing/JOptionPane.java 2014-08-11 11:50:21.144862500 +0400 @@ -22,7 +22,6 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ - package javax.swing; import java.awt.BorderLayout; @@ -35,6 +34,8 @@ import java.awt.Point; import java.awt.HeadlessException; import java.awt.Window; +import java.beans.JavaBean; +import java.beans.BeanProperty; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.awt.event.WindowListener; @@ -301,14 +302,12 @@ * * @see JInternalFrame * - * @beaninfo - * attribute: isContainer true - * description: A component which implements standard dialog box controls. - * * @author James Gosling * @author Scott Violet * @since 1.2 */ +@JavaBean(defaultProperty = "UI", description = "A component which implements standard dialog box controls.") +@SwingContainer @SuppressWarnings("serial") // Same-version serialization only public class JOptionPane extends JComponent implements Accessible { @@ -1826,11 +1825,9 @@ * * @param ui the OptionPaneUI {@literal L&F} object * @see UIDefaults#getUI - * @beaninfo - * bound: true - * hidden: true - * description: The UI object that implements the optionpane's LookAndFeel */ + @BeanProperty(hidden = true, description + = "The UI object that implements the optionpane's LookAndFeel") public void setUI(OptionPaneUI ui) { if (this.ui != ui) { super.setUI(ui); @@ -1867,6 +1864,7 @@ * @see JComponent#getUIClassID * @see UIDefaults#getUI */ + @BeanProperty(bound = false) public String getUIClassID() { return uiClassID; } @@ -1876,12 +1874,9 @@ * Sets the option pane's message-object. * @param newMessage the Object to display * @see #getMessage - * - * @beaninfo - * preferred: true - * bound: true - * description: The optionpane's message object. */ + @BeanProperty(preferred = true, description + = "The optionpane's message object.") public void setMessage(Object newMessage) { Object oldMessage = message; @@ -1905,11 +1900,9 @@ * @param newIcon the Icon to display * * @see #getIcon - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's type icon. */ + @BeanProperty(preferred = true, description + = "The option pane's type icon.") public void setIcon(Icon newIcon) { Object oldIcon = icon; @@ -1932,11 +1925,9 @@ * @param newValue the chosen value * * @see #getValue - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's value object. */ + @BeanProperty(preferred = true, description + = "The option pane's value object.") public void setValue(Object newValue) { Object oldValue = value; @@ -1973,10 +1964,9 @@ * Components to add to the pane * * @see #getOptions - * @beaninfo - * bound: true - * description: The option pane's options objects. */ + @BeanProperty(description + = "The option pane's options objects.") public void setOptions(Object[] newOptions) { Object[] oldOptions = options; @@ -2010,11 +2000,9 @@ * keyboard focus * * @see #getInitialValue - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's initial value object. */ + @BeanProperty(preferred = true, description + = "The option pane's initial value object.") public void setInitialValue(Object newInitialValue) { Object oldIV = initialValue; @@ -2046,11 +2034,9 @@ * legal values listed above * @see #getMessageType - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's message type. */ + @BeanProperty(preferred = true, description + = "The option pane's message type.") public void setMessageType(int newType) { checkMessageType(newType); int oldType = messageType; @@ -2095,11 +2081,9 @@ * * @see #getOptionType * @see #setOptions - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's option type. */ + @BeanProperty(preferred = true, description + = "The option pane's option type.") public void setOptionType(int newType) { checkOptionType(newType); int oldType = optionType; @@ -2147,10 +2131,9 @@ * @see #setWantsInput * @see #setInitialSelectionValue * @see #getSelectionValues - * @beaninfo - * bound: true - * description: The option pane's selection values. */ + @BeanProperty(description + = "The option pane's selection values.") public void setSelectionValues(Object[] newValues) { Object[] oldValues = selectionValues; @@ -2176,10 +2159,9 @@ * @param newValue the initially selected value * @see #setSelectionValues * @see #getInitialSelectionValue - * @beaninfo - * bound: true - * description: The option pane's initial selection value object. */ + @BeanProperty(description + = "The option pane's initial selection value object.") public void setInitialSelectionValue(Object newValue) { Object oldValue = initialSelectionValue; @@ -2213,11 +2195,9 @@ * @see #setInitialSelectionValue * @see #setWantsInput * @see #getInputValue - * @beaninfo - * preferred: true - * bound: true - * description: The option pane's input value object. */ + @BeanProperty(preferred = true, description + = "The option pane's input value object.") public void setInputValue(Object newValue) { Object oldValue = inputValue; @@ -2249,6 +2229,7 @@ * * @return an integer giving the maximum number of characters on a line */ + @BeanProperty(bound = false) public int getMaxCharactersPerLineCount() { return Integer.MAX_VALUE; } @@ -2269,11 +2250,9 @@ * is provided to allow the user to input a value. * @see #setSelectionValues * @see #setInputValue - * @beaninfo - * preferred: true - * bound: true - * description: Flag which allows the user to input a value. */ + @BeanProperty(preferred = true, description + = "Flag which allows the user to input a value.") public void setWantsInput(boolean newValue) { boolean oldValue = wantsInput; @@ -2523,10 +2502,9 @@ * * @return an AccessibleJOptionPane that serves as the * AccessibleContext of this AccessibleJOptionPane - * @beaninfo - * expert: true - * description: The AccessibleContext associated with this option pane */ + @BeanProperty(bound = false, expert = true, description + = "The AccessibleContext associated with this option pane") public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJOptionPane();