- 所有父级接口:
AttributeSet,MutableAttributeSet
- 所有已知的实现类:
StyleContext.NamedStyle
与文档中的元素关联的属性集合。由于这些通常用于将字符和段落样式与元素相关联,因此提供了用于此的操作。与该元素相关联的其他自定义属性将有效地成为存在于层次结构中的名称-值对,如果在本地找不到名称(键),则将请求转发给父元素。常用的属性被分离出来,以促进更有效的替代实现。
-
内部类总结
在接口 javax.swing.text.AttributeSet 中声明的嵌套类/接口
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute -
字段摘要
在接口 javax.swing.text.AttributeSet 中声明的字段
NameAttribute, ResolveAttribute -
方法总结
在接口 javax.swing.text.AttributeSet 中声明的方法
containsAttribute, containsAttributes, copyAttributes, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, isDefined, isEqual在接口 javax.swing.text.MutableAttributeSet 中声明的方法
addAttribute, addAttributes, removeAttribute, removeAttributes, removeAttributes, setResolveParent
-
方法详情
-
getName
String getName()获取样式的名称。样式不需要命名,因此如果没有与样式关联的名称,则返回null。- 返回:
- 名字
-
addChangeListener
添加一个监听以在属性更改时进行跟踪。- 参数:
l- 变化监听器
-
removeChangeListener
删除跟踪属性更改的监听。- 参数:
l- 变化监听器
-