APIdia Launch Partner
Top Fields Constructors Methods
javax.swing.text.rtf

pack-priv Class MockAttributeSet

extends Object
implements AttributeSet, MutableAttributeSet
Class Inheritance
All Implemented Interfaces
javax.swing.text.MutableAttributeSet, javax.swing.text.AttributeSet
Imports
java.util.Dictionary, .Enumeration, javax.swing.text.AttributeSet, .MutableAttributeSet

Field Summary

Modifier and TypeField and Description
public Dictionary<Object, Object>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(Object name, Object value)

Implements javax.swing.text.MutableAttributeSet.addAttribute.

Creates a new attribute set similar to this one except that it contains an attribute with the given name and value.

public void
addAttributes(AttributeSet attr)

Implements javax.swing.text.MutableAttributeSet.addAttributes.

Creates a new attribute set similar to this one except that it contains the given attributes and values.

public boolean
containsAttribute(Object name, Object value)

Implements javax.swing.text.AttributeSet.containsAttribute.

Returns true if this set defines an attribute with the same name and an equal value.

public boolean
containsAttributes(AttributeSet attr)

Implements javax.swing.text.AttributeSet.containsAttributes.

Returns true if this set defines all the attributes from the given set with equal values.

public AttributeSet
copyAttributes()

Implements javax.swing.text.AttributeSet.copyAttributes.

Returns an attribute set that is guaranteed not to change over time.

public Object
getAttribute(Object name)

Implements javax.swing.text.AttributeSet.getAttribute.

Fetches the value of the given attribute.

public int
getAttributeCount()

Implements javax.swing.text.AttributeSet.getAttributeCount.

Returns the number of attributes that are defined locally in this set.

public Enumeration<?>
getAttributeNames()

Implements javax.swing.text.AttributeSet.getAttributeNames.

Returns an enumeration over the names of the attributes that are defined locally in the set.

public AttributeSet
getResolveParent()

Implements javax.swing.text.AttributeSet.getResolveParent.

Gets the resolving parent.

public boolean
isDefined(Object name)

Implements javax.swing.text.AttributeSet.isDefined.

Checks whether the named attribute has a value specified in the set without resolving through another attribute set.

public boolean
public boolean
isEqual(AttributeSet attr)

Implements javax.swing.text.AttributeSet.isEqual.

Determines if the two attribute sets are equivalent.

public void
removeAttribute(Object name)

Implements javax.swing.text.MutableAttributeSet.removeAttribute.

Removes an attribute with the given name.

public void
removeAttributes(AttributeSet attr)

Implements javax.swing.text.MutableAttributeSet.removeAttributes.

Removes a set of attributes with the given name.

public void
removeAttributes(Enumeration<?> en)

Implements javax.swing.text.MutableAttributeSet.removeAttributes.

Removes an attribute set with the given names.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backingback to summary
public Dictionary<Object, Object> backing

Constructor Detail

MockAttributeSetback to summary
pack-priv MockAttributeSet()

Method Detail

addAttributeback to summary
public void addAttribute(Object name, Object value)

Implements javax.swing.text.MutableAttributeSet.addAttribute.

Doc from javax.swing.text.MutableAttributeSet.addAttribute.

Creates a new attribute set similar to this one except that it contains an attribute with the given name and value. The object must be immutable, or not mutated by any client.

addAttributesback to summary
public void addAttributes(AttributeSet attr)

Implements javax.swing.text.MutableAttributeSet.addAttributes.

Doc from javax.swing.text.MutableAttributeSet.addAttributes.

Creates a new attribute set similar to this one except that it contains the given attributes and values.

containsAttributeback to summary
public boolean containsAttribute(Object name, Object value)

Implements javax.swing.text.AttributeSet.containsAttribute.

Doc from javax.swing.text.AttributeSet.containsAttribute.

Returns true if this set defines an attribute with the same name and an equal value. If such an attribute is not found locally, it is searched through in the resolving parent hierarchy.

containsAttributesback to summary
public boolean containsAttributes(AttributeSet attr)

Implements javax.swing.text.AttributeSet.containsAttributes.

Doc from javax.swing.text.AttributeSet.containsAttributes.

Returns true if this set defines all the attributes from the given set with equal values. If an attribute is not found locally, it is searched through in the resolving parent hierarchy.

copyAttributesback to summary
public AttributeSet copyAttributes()

Implements javax.swing.text.AttributeSet.copyAttributes.

Doc from javax.swing.text.AttributeSet.copyAttributes.

Returns an attribute set that is guaranteed not to change over time.

getAttributeback to summary
public Object getAttribute(Object name)

Implements javax.swing.text.AttributeSet.getAttribute.

Doc from javax.swing.text.AttributeSet.getAttribute.

Fetches the value of the given attribute. If the value is not found locally, the search is continued upward through the resolving parent (if one exists) until the value is either found or there are no more parents. If the value is not found, null is returned.

getAttributeCountback to summary
public int getAttributeCount()

Implements javax.swing.text.AttributeSet.getAttributeCount.

Doc from javax.swing.text.AttributeSet.getAttributeCount.

Returns the number of attributes that are defined locally in this set. Attributes that are defined in the parent set are not included.

getAttributeNamesback to summary
public Enumeration<?> getAttributeNames()

Implements javax.swing.text.AttributeSet.getAttributeNames.

Doc from javax.swing.text.AttributeSet.getAttributeNames.

Returns an enumeration over the names of the attributes that are defined locally in the set. Names of attributes defined in the resolving parent, if any, are not included. The values of the Enumeration may be anything and are not constrained to a particular Object type.

This method never returns null. For a set with no attributes, it returns an empty Enumeration.

getResolveParentback to summary
public AttributeSet getResolveParent()

Implements javax.swing.text.AttributeSet.getResolveParent.

Doc from javax.swing.text.AttributeSet.getResolveParent.

Gets the resolving parent.

isDefinedback to summary
public boolean isDefined(Object name)

Implements javax.swing.text.AttributeSet.isDefined.

Doc from javax.swing.text.AttributeSet.isDefined.

Checks whether the named attribute has a value specified in the set without resolving through another attribute set.

isEmptyback to summary
public boolean isEmpty()
isEqualback to summary
public boolean isEqual(AttributeSet attr)

Implements javax.swing.text.AttributeSet.isEqual.

Doc from javax.swing.text.AttributeSet.isEqual.

Determines if the two attribute sets are equivalent.

removeAttributeback to summary
public void removeAttribute(Object name)

Implements javax.swing.text.MutableAttributeSet.removeAttribute.

Doc from javax.swing.text.MutableAttributeSet.removeAttribute.

Removes an attribute with the given name.

removeAttributesback to summary
public void removeAttributes(AttributeSet attr)

Implements javax.swing.text.MutableAttributeSet.removeAttributes.

Doc from javax.swing.text.MutableAttributeSet.removeAttributes.

Removes a set of attributes with the given name.

removeAttributesback to summary
public void removeAttributes(Enumeration<?> en)

Implements javax.swing.text.MutableAttributeSet.removeAttributes.

Doc from javax.swing.text.MutableAttributeSet.removeAttributes.

Removes an attribute set with the given names.

setResolveParentback to summary
public void setResolveParent(AttributeSet pp)

Implements javax.swing.text.MutableAttributeSet.setResolveParent.

Doc from javax.swing.text.MutableAttributeSet.setResolveParent.

Sets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally.