< prev index next >

src/java.desktop/share/classes/javax/swing/text/AttributeSet.java

Print this page




 118      * @return a copy of the attribute set
 119      */
 120     public AttributeSet copyAttributes();
 121 
 122     /**
 123      * Fetches the value of the given attribute. If the value is not found
 124      * locally, the search is continued upward through the resolving
 125      * parent (if one exists) until the value is either
 126      * found or there are no more parents.  If the value is not found,
 127      * null is returned.
 128      *
 129      * @param key the non-null key of the attribute binding
 130      * @return the value of the attribute, or {@code null} if not found
 131      */
 132     public Object getAttribute(Object key);
 133 
 134     /**
 135      * Returns an enumeration over the names of the attributes that are
 136      * defined locally in the set. Names of attributes defined in the
 137      * resolving parent, if any, are not included. The values of the
 138      * <code>Enumeration</code> may be anything and are not constrained to
 139      * a particular <code>Object</code> type.
 140      * <p>
 141      * This method never returns {@code null}. For a set with no attributes, it
 142      * returns an empty {@code Enumeration}.
 143      *
 144      * @return the names
 145      */
 146     public Enumeration<?> getAttributeNames();
 147 
 148     /**
 149      * Returns {@code true} if this set defines an attribute with the same
 150      * name and an equal value. If such an attribute is not found locally,
 151      * it is searched through in the resolving parent hierarchy.
 152      *
 153      * @param name the non-null attribute name
 154      * @param value the value
 155      * @return {@code true} if the set defines the attribute with an
 156      *     equal value, either locally or through its resolving parent
 157      * @throws NullPointerException if either {@code name} or
 158      *      {@code value} is {@code null}
 159      */




 118      * @return a copy of the attribute set
 119      */
 120     public AttributeSet copyAttributes();
 121 
 122     /**
 123      * Fetches the value of the given attribute. If the value is not found
 124      * locally, the search is continued upward through the resolving
 125      * parent (if one exists) until the value is either
 126      * found or there are no more parents.  If the value is not found,
 127      * null is returned.
 128      *
 129      * @param key the non-null key of the attribute binding
 130      * @return the value of the attribute, or {@code null} if not found
 131      */
 132     public Object getAttribute(Object key);
 133 
 134     /**
 135      * Returns an enumeration over the names of the attributes that are
 136      * defined locally in the set. Names of attributes defined in the
 137      * resolving parent, if any, are not included. The values of the
 138      * {@code Enumeration} may be anything and are not constrained to
 139      * a particular {@code Object} type.
 140      * <p>
 141      * This method never returns {@code null}. For a set with no attributes, it
 142      * returns an empty {@code Enumeration}.
 143      *
 144      * @return the names
 145      */
 146     public Enumeration<?> getAttributeNames();
 147 
 148     /**
 149      * Returns {@code true} if this set defines an attribute with the same
 150      * name and an equal value. If such an attribute is not found locally,
 151      * it is searched through in the resolving parent hierarchy.
 152      *
 153      * @param name the non-null attribute name
 154      * @param value the value
 155      * @return {@code true} if the set defines the attribute with an
 156      *     equal value, either locally or through its resolving parent
 157      * @throws NullPointerException if either {@code name} or
 158      *      {@code value} is {@code null}
 159      */


< prev index next >