-
- 所有已知实现类:
-
StyleContext,StyleSheet
- Enclosing class:
- AbstractDocument
public static interface AbstractDocument.AttributeContext一个可用于允许MutableAttributeSet实现使用可插拔属性压缩技术的接口。 属性集的每个突变都可以用于将先前的AttributeSet实例与另一个实例进行交换,从而保持AttributeSet保持不变的可能性。 一个实现由StyleContext类提供。 此类提供的Element实现使用此接口提供其MutableAttributeSet实现,以便可以使用不同的AttributeSet压缩技术。 应该实现方法getAttributeContext以返回负责实现期望的压缩技术的对象。- 另请参见:
-
StyleContext
-
-
方法摘要
所有方法 接口方法 抽象方法 Modifier and Type 方法 描述 AttributeSetaddAttribute(AttributeSet old, Object name, Object value)向给定集添加属性,并返回新的代表集。AttributeSetaddAttributes(AttributeSet old, AttributeSet attr)向元素添加一组属性。AttributeSetgetEmptySet()获取一个空的AttributeSet。voidreclaim(AttributeSet a)回收一个属性集。AttributeSetremoveAttribute(AttributeSet old, Object name)从集合中删除属性。AttributeSetremoveAttributes(AttributeSet old, Enumeration<?> names)删除元素的一组属性。AttributeSetremoveAttributes(AttributeSet old, AttributeSet attrs)删除元素的一组属性。
-
-
-
方法详细信息
-
addAttribute
AttributeSet addAttribute(AttributeSet old, Object name, Object value)
向给定集添加属性,并返回新的代表集。- 参数
-
old- 旧属性集 -
name- 非空属性名称 -
value- 属性值 - 结果
- 更新的属性集
- 另请参见:
-
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)
-
addAttributes
AttributeSet addAttributes(AttributeSet old, AttributeSet attr)
向元素添加一组属性。- 参数
-
old- 旧的属性集 -
attr- 要添加的属性 - 结果
- 更新的属性集
- 另请参见:
-
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)
-
removeAttribute
AttributeSet removeAttribute(AttributeSet old, Object name)
从集合中删除属性。- 参数
-
old- 旧的属性集 -
name- 非空属性名称 - 结果
- 更新的属性集
- 另请参见:
-
MutableAttributeSet.removeAttribute(java.lang.Object)
-
removeAttributes
AttributeSet removeAttributes(AttributeSet old, Enumeration<?> names)
删除元素的一组属性。- 参数
-
old- 旧属性集 -
names- 属性名称 - 结果
- 更新的属性集
- 另请参见:
-
MutableAttributeSet.removeAttributes(java.util.Enumeration<?>)
-
removeAttributes
AttributeSet removeAttributes(AttributeSet old, AttributeSet attrs)
删除元素的一组属性。- 参数
-
old- 旧属性集 -
attrs- 属性 - 结果
- 更新的属性集
- 另请参见:
-
MutableAttributeSet.removeAttributes(java.util.Enumeration<?>)
-
getEmptySet
AttributeSet getEmptySet()
获取一个空的AttributeSet。- 结果
- 属性集
-
reclaim
void reclaim(AttributeSet a)
回收一个属性集。 这是MutableAttributeSet标记它不再需要一个特定的不可变集的一种方式。 这只有在1.1没有弱参考的情况下才是必需的。 1.1实现将在其finalize方法中调用此方法。- 参数
-
a- 设置为回收的属性
-
-