javax.swing.text
Interface MutableAttributeSet

All Superinterfaces:
AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
All Known Subinterfaces:
Style sample code for javax.swing.text.Style definition code for javax.swing.text.Style
All Known Implementing Classes:
AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement definition code for javax.swing.text.AbstractDocument.AbstractElement , AbstractDocument.BranchElement sample code for javax.swing.text.AbstractDocument.BranchElement definition code for javax.swing.text.AbstractDocument.BranchElement , AbstractDocument.LeafElement sample code for javax.swing.text.AbstractDocument.LeafElement definition code for javax.swing.text.AbstractDocument.LeafElement , DefaultStyledDocument.SectionElement sample code for javax.swing.text.DefaultStyledDocument.SectionElement definition code for javax.swing.text.DefaultStyledDocument.SectionElement , HTMLDocument.BlockElement sample code for javax.swing.text.html.HTMLDocument.BlockElement definition code for javax.swing.text.html.HTMLDocument.BlockElement , HTMLDocument.RunElement sample code for javax.swing.text.html.HTMLDocument.RunElement definition code for javax.swing.text.html.HTMLDocument.RunElement , SimpleAttributeSet sample code for javax.swing.text.SimpleAttributeSet definition code for javax.swing.text.SimpleAttributeSet , StyleContext.NamedStyle sample code for javax.swing.text.StyleContext.NamedStyle definition code for javax.swing.text.StyleContext.NamedStyle

public interface MutableAttributeSet
extends AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet

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);


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute sample code for javax.swing.text.AttributeSet.CharacterAttribute definition code for javax.swing.text.AttributeSet.CharacterAttribute , AttributeSet.ColorAttribute sample code for javax.swing.text.AttributeSet.ColorAttribute definition code for javax.swing.text.AttributeSet.ColorAttribute , AttributeSet.FontAttribute sample code for javax.swing.text.AttributeSet.FontAttribute definition code for javax.swing.text.AttributeSet.FontAttribute , AttributeSet.ParagraphAttribute sample code for javax.swing.text.AttributeSet.ParagraphAttribute definition code for javax.swing.text.AttributeSet.ParagraphAttribute
 
Field Summary
 
Fields inherited from interface javax.swing.text.AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
NameAttribute sample code for javax.swing.text.AttributeSet.NameAttribute definition code for javax.swing.text.AttributeSet.NameAttribute , ResolveAttribute sample code for javax.swing.text.AttributeSet.ResolveAttribute definition code for javax.swing.text.AttributeSet.ResolveAttribute
 
Method Summary
 void addAttribute sample code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  name, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Creates a new attribute set similar to this one except that it contains an attribute with the given name and value.
 void addAttributes sample code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attributes)
          Creates a new attribute set similar to this one except that it contains the given attributes and values.
 void removeAttribute sample code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  name)
          Removes an attribute with the given name.
 void removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attributes)
          Removes a set of attributes with the given name.
 void removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) (Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> names)
          Removes an attribute set with the given names.
 void setResolveParent sample code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  parent)
          Sets the resolving parent.
 
Methods inherited from interface javax.swing.text.AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
containsAttribute sample code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) , containsAttributes sample code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet) , copyAttributes sample code for javax.swing.text.AttributeSet.copyAttributes() definition code for javax.swing.text.AttributeSet.copyAttributes() , getAttribute sample code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object) definition code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object) , getAttributeCount sample code for javax.swing.text.AttributeSet.getAttributeCount() definition code for javax.swing.text.AttributeSet.getAttributeCount() , getAttributeNames sample code for javax.swing.text.AttributeSet.getAttributeNames() definition code for javax.swing.text.AttributeSet.getAttributeNames() , getResolveParent sample code for javax.swing.text.AttributeSet.getResolveParent() definition code for javax.swing.text.AttributeSet.getResolveParent() , isDefined sample code for javax.swing.text.AttributeSet.isDefined(java.lang.Object) definition code for javax.swing.text.AttributeSet.isDefined(java.lang.Object) , isEqual sample code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet)
 

Method Detail

addAttribute sample code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

void addAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  name,
                  Object sample code for java.lang.Object definition code for java.lang.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 - the name
value - the value

addAttributes sample code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet)

void addAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attributes)
Creates a new attribute set similar to this one except that it contains the given attributes and values.

Parameters:
attributes - the set of attributes

removeAttribute sample code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object)

void removeAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  name)
Removes an attribute with the given name.

Parameters:
name - the attribute name

removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration<?>) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration<?>)

void removeAttributes(Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> names)
Removes an attribute set with the given names.

Parameters:
names - the set of names

removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet)

void removeAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attributes)
Removes a set of attributes with the given name.

Parameters:
attributes - the set of attributes

setResolveParent sample code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)

void setResolveParent(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  parent)
Sets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally.

Parameters:
parent - the parent