-
- All Superinterfaces:
-
AttributeSet
- All Known Subinterfaces:
-
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);
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
-
-
Field Summary
-
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
-
-
方法摘要
所有方法 接口方法 抽象方法 Modifier and Type 方法 描述 voidaddAttribute(Object name, Object value)创建与此类似的新属性集,除了它包含具有给定名称和值的属性。voidaddAttributes(AttributeSet attributes)创建与此类似的新属性集,除了它包含给定的属性和值。voidremoveAttribute(Object name)删除给定的属性name。voidremoveAttributes(Enumeration<?> names)删除给定的属性集names。voidremoveAttributes(AttributeSet attributes)使用给定的name删除一组属性。voidsetResolveParent(AttributeSet parent)设置解析父项。-
Methods inherited from interface 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)
删除给定的属性集names。- 参数
-
names- 一组名称
-
removeAttributes
void removeAttributes(AttributeSet attributes)
使用给定的name删除一组属性。- 参数
-
attributes- 属性集
-
setResolveParent
void setResolveParent(AttributeSet parent)
设置解析父项。 如果属性未在本地定义,则这是要解析的属性集。- 参数
-
parent- 父母
-
-