--- old/src/java.desktop/share/classes/javax/swing/text/StyleContext.java 2015-04-14 15:34:42.919837028 -0700
+++ new/src/java.desktop/share/classes/javax/swing/text/StyleContext.java 2015-04-14 15:34:42.691837022 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -479,9 +479,9 @@
* behavior of SmallAttributeSet. This can be reimplemented
* to return an AttributeSet that provides some sort of
* attribute conversion.
- *
* @param a The set of attributes to be represented in the
* the compact form.
+ * @return a compact set of attributes that might be shared
*/
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a) {
return new SmallAttributeSet(a);
@@ -498,6 +498,8 @@
*
* @param a The set of attributes to be represented in the
* the larger form.
+ * @return a large set of attributes that should trade off
+ * space for time
*/
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a) {
return new SimpleAttributeSet(a);
@@ -558,6 +560,9 @@
/**
* Context-specific handling of writing out attributes
+ * @param out the output stream
+ * @param a the attribute set
+ * @exception IOException on any I/O error
*/
public void writeAttributes(ObjectOutputStream out,
AttributeSet a) throws IOException {
@@ -566,6 +571,13 @@
/**
* Context-specific handling of reading in attributes
+ * @param in the object stream to read the attribute data from.
+ * @param a the attribute set to place the attribute
+ * definitions in.
+ * @exception ClassNotFoundException passed upward if encountered
+ * when reading the object stream.
+ * @exception IOException passed upward if encountered when
+ * reading the object stream.
*/
public void readAttributes(ObjectInputStream in,
MutableAttributeSet a) throws ClassNotFoundException, IOException {
@@ -685,6 +697,9 @@
/**
* Returns the object previously registered with
* registerStaticAttributeKey
.
+ * @param key the object key
+ * @return Returns the object previously registered with
+ * {@code registerStaticAttributeKey}
*/
public static Object getStaticAttribute(Object key) {
if (thawKeyMap == null || key == null) {
@@ -694,9 +709,11 @@
}
/**
- * Returns the String that key
will be registered with
+ * Returns the String that key
will be registered with.
* @see #getStaticAttribute
* @see #registerStaticAttributeKey
+ * @param key the object key
+ * @return the String that {@code key} will be registered with
*/
public static Object getStaticAttributeKey(Object key) {
return key.getClass().getName() + "." + key.toString();
@@ -772,11 +789,19 @@
*/
public class SmallAttributeSet implements AttributeSet {
+ /**
+ * Constructs a SmallAttributeSet.
+ * @param attributes the attributes
+ */
public SmallAttributeSet(Object[] attributes) {
this.attributes = attributes;
updateResolveParent();
}
+ /**
+ * Constructs a SmallAttributeSet.
+ * @param attrs the attributes
+ */
public SmallAttributeSet(AttributeSet attrs) {
int n = attrs.getAttributeCount();
Object[] tbl = new Object[2 * n];
@@ -818,7 +843,8 @@
// --- Object methods -------------------------
/**
- * Returns a string showing the key/value pairs
+ * Returns a string showing the key/value pairs.
+ * @return a string showing the key/value pairs
*/
public String toString() {
String s = "{";
@@ -1382,7 +1408,8 @@
/**
* Return an array of all the listeners of the given type that
* were added to this model.
- *
+ * @param the listener type
+ * @param listenerType the type of listeners requested
* @return all of the objects receiving listenerType notifications
* from this model
*