JavaTM 2 Platform
Standard Ed. 6

javax.swing.text
接口 MutableAttributeSet

所有超级接口:
AttributeSet
所有已知子接口:
Style
所有已知实现类:
AbstractDocument.AbstractElement, AbstractDocument.BranchElement, AbstractDocument.LeafElement, DefaultStyledDocument.SectionElement, HTMLDocument.BlockElement, HTMLDocument.RunElement, SimpleAttributeSet, StyleContext.NamedStyle

public interface MutableAttributeSet
extends AttributeSet

独特属性的可变集合的通用接口。 实现可能需要提供以下形式的构造方法:public XXXAttributeSet(ConstAttributeSet source);


嵌套类摘要
 
从接口 javax.swing.text.AttributeSet 继承的嵌套类/接口
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
 
字段摘要
 
从接口 javax.swing.text.AttributeSet 继承的字段
NameAttribute, ResolveAttribute
 
方法摘要
 void addAttribute(Object name, Object value)
          创建一个与此属性集类似的新属性集,不同之处在于它包含具有给定名称和值的属性。
 void addAttributes(AttributeSet attributes)
          创建一个与此属性集类似的新属性集,不同之处在于它包含具有给定名称和值的属性。
 void removeAttribute(Object name)
          移除具有给定 name 的属性。
 void removeAttributes(AttributeSet attributes)
          移除具有给定 name 的属性集。
 void removeAttributes(Enumeration<?> names)
          移除具有给定 name 的属性集。
 void setResolveParent(AttributeSet parent)
          设置正解析的父级。
 
从接口 javax.swing.text.AttributeSet 继承的方法
containsAttribute, containsAttributes, copyAttributes, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, isDefined, isEqual
 

方法详细信息

addAttribute

void addAttribute(Object name,
                  Object value)
创建一个与此属性集类似的新属性集,不同之处在于它包含具有给定名称和值的属性。该对象必须是不可变的,或者说不能由任何客户端改变。

参数:
name - 名称
value - 值

addAttributes

void addAttributes(AttributeSet attributes)
创建一个与此属性集类似的新属性集,不同之处在于它包含具有给定名称和值的属性。

参数:
attributes - 属性集

removeAttribute

void removeAttribute(Object name)
移除具有给定 name 的属性。

参数:
name - 属性名称

removeAttributes

void removeAttributes(Enumeration<?> names)
移除具有给定 name 的属性集。

参数:
names - 名称集

removeAttributes

void removeAttributes(AttributeSet attributes)
移除具有给定 name 的属性集。

参数:
attributes - 属性集

setResolveParent

void setResolveParent(AttributeSet parent)
设置正解析的父级。如果某个属性未在本地定义,则它就是要进行解析的属性集。

参数:
parent - 父级

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only