Top Description Fields Methods
javax.swing.text

public Interface MutableAttributeSet

extends AttributeSet
Known Direct Subinterfaces
javax.swing.text.Style
Known Direct Implementers
javax.swing.text.SimpleAttributeSet, javax.swing.text.rtf.MockAttributeSet, javax.swing.text.AbstractDocument.AbstractElement
Imports
java.util.Enumeration

A generic interface for a mutable collection of unique attributes. Implementations will probably want to provide a constructor of the form:
public XXXAttributeSet(ConstAttributeSet source);

Field Summary

Inherited from javax.swing.text.AttributeSet:
NameAttributeResolveAttribute

Method Summary

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

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
the set of attributes
attributes
)

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

public void
removeAttribute(Object
the attribute name
name
)

Removes an attribute with the given name.

public void
removeAttributes(Enumeration<?>
the set of names
names
)

Removes an attribute set with the given names.

public void
removeAttributes(AttributeSet
the set of attributes
attributes
)

Removes a set of attributes with the given name.

public void
setResolveParent(AttributeSet
the parent
parent
)

Sets the resolving parent.

Inherited from javax.swing.text.AttributeSet:
containsAttributecontainsAttributescopyAttributesgetAttributegetAttributeCountgetAttributeNamesgetResolveParentisDefinedisEqual

Method Detail

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

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.

Parameters
name:Object

the name

value:Object

the value

addAttributesback to summary
public void addAttributes(AttributeSet attributes)

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

Parameters
attributes:AttributeSet

the set of attributes

removeAttributeback to summary
public void removeAttribute(Object name)

Removes an attribute with the given name.

Parameters
name:Object

the attribute name

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

Removes an attribute set with the given names.

Parameters
names:Enumeration<?>

the set of names

removeAttributesback to summary
public void removeAttributes(AttributeSet attributes)

Removes a set of attributes with the given name.

Parameters
attributes:AttributeSet

the set of attributes

setResolveParentback to summary
public void setResolveParent(AttributeSet parent)

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

Parameters
parent:AttributeSet

the parent