--- old/jdk/src/share/classes/javax/swing/JEditorPane.java 2014-08-11 11:49:52.249209800 +0400
+++ new/jdk/src/share/classes/javax/swing/JEditorPane.java 2014-08-11 11:49:51.902190000 +0400
@@ -24,15 +24,13 @@
*/
package javax.swing;
-import sun.swing.SwingUtilities2;
-
import java.awt.*;
-import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
import java.lang.reflect.*;
import java.net.*;
import java.util.*;
import java.io.*;
-import java.util.*;
import javax.swing.plaf.*;
import javax.swing.text.*;
@@ -184,13 +182,11 @@
* has been added to the java.beans
package.
* Please see {@link java.beans.XMLEncoder}.
*
- * @beaninfo
- * attribute: isContainer false
- * description: A text component to edit various types of content.
- *
* @author Timothy Prinzing
* @since 1.2
*/
+@JavaBean(defaultProperty = "UIClassID", description = "A text component to edit various types of content.")
+@SwingContainer(false)
@SuppressWarnings("serial") // Same-version serialization only
public class JEditorPane extends JTextComponent {
@@ -323,6 +319,7 @@
* array if no listeners have been added
* @since 1.4
*/
+ @BeanProperty(bound = false)
public synchronized HyperlinkListener[] getHyperlinkListeners() {
return listenerList.getListeners(javax.swing.event.HyperlinkListener.class);
}
@@ -411,11 +408,9 @@
* @exception IOException for a null
or invalid
* page specification, or exception from the stream being read
* @see #getPage
- * @beaninfo
- * description: the URL used to set content
- * bound: true
- * expert: true
*/
+ @BeanProperty(expert = true, description
+ = "the URL used to set content")
public void setPage(URL page) throws IOException {
if (page == null) {
throw new IOException("invalid url");
@@ -893,6 +888,7 @@
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
*/
+ @BeanProperty(bound = false)
public String getUIClassID() {
return uiClassID;
}
@@ -958,11 +954,11 @@
* @param type the non-null
mime type for the content editing
* support
* @see #getContentType
- * @beaninfo
- * description: the type of content
* @throws NullPointerException if the type
parameter
* is null
*/
+ @BeanProperty(bound = false, description
+ = "the type of content")
public final void setContentType(String type) {
// The type could have optional info is part of it,
// for example some charset info. We need to strip that
@@ -1044,11 +1040,9 @@
*
* @param kit the desired editor behavior
* @see #getEditorKit
- * @beaninfo
- * description: the currently installed kit for handling content
- * bound: true
- * expert: true
*/
+ @BeanProperty(expert = true, description
+ = "the currently installed kit for handling content")
public void setEditorKit(EditorKit kit) {
EditorKit old = this.kit;
isUserSetEditorKit = true;
@@ -1412,9 +1406,9 @@
* @param t the new text to be set; if null
the old
* text will be deleted
* @see #getText
- * @beaninfo
- * description: the text of this component
*/
+ @BeanProperty(bound = false, description
+ = "the text of this component")
public void setText(String t) {
try {
Document doc = getDocument();
@@ -1464,6 +1458,7 @@
* @return true if a viewport should force the Scrollables width to
* match its own, false otherwise
*/
+ @BeanProperty(bound = false)
public boolean getScrollableTracksViewportWidth() {
Container parent = SwingUtilities.getUnwrappedParent(this);
if (parent instanceof JViewport) {
@@ -1487,6 +1482,7 @@
* Scrollable
's height to match its own,
* false otherwise
*/
+ @BeanProperty(bound = false)
public boolean getScrollableTracksViewportHeight() {
Container parent = SwingUtilities.getUnwrappedParent(this);
if (parent instanceof JViewport) {
@@ -1624,6 +1620,7 @@
* @return an AccessibleJEditorPane that serves as the
* AccessibleContext of this JEditorPane
*/
+ @BeanProperty(bound = false)
public AccessibleContext getAccessibleContext() {
if (getEditorKit() instanceof HTMLEditorKit) {
if (accessibleContext == null || accessibleContext.getClass() !=