|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface AbstractDocument.AttributeContext
Defines a set of methods for managing text attributes for one or more
Document
s.
Replicating AttributeSet
s throughout a Document
can
be very expensive. Implementations of this interface are intended to
provide intelligent management of AttributeSet
s, eliminating
costly duplication.
StyleContext
Method Summary | |
---|---|
AttributeSet |
addAttribute(AttributeSet old,
Object name,
Object value)
Returns an AttributeSet that contains the attributes
of old plus the new attribute specified by
name and value . |
AttributeSet |
addAttributes(AttributeSet old,
AttributeSet attributes)
Returns an AttributeSet that contains the attributes
of old plus the new attributes in attributes . |
AttributeSet |
getEmptySet()
Returns an empty AttributeSet . |
void |
reclaim(AttributeSet attributes)
Called to indicate that the attributes in attributes are
no longer used. |
AttributeSet |
removeAttribute(AttributeSet old,
Object name)
Returns a AttributeSet that has the attribute with the specified
name removed from old . |
AttributeSet |
removeAttributes(AttributeSet old,
AttributeSet attributes)
Removes all attributes in attributes from old
and returns the resulting AttributeSet . |
AttributeSet |
removeAttributes(AttributeSet old,
Enumeration<?> names)
Removes all attributes specified by names from
old and returns the resulting AttributeSet . |
Method Detail |
---|
AttributeSet addAttribute(AttributeSet old, Object name, Object value)
AttributeSet
that contains the attributes
of old
plus the new attribute specified by
name
and value
.
old
- the attribute set to be merged with the new attributename
- the name of the attribute to be addedvalue
- the value of the attribute to be added
AttributeSet addAttributes(AttributeSet old, AttributeSet attributes)
AttributeSet
that contains the attributes
of old
plus the new attributes in attributes
.
old
- the set of attributes where to add the new attributesattributes
- the attributes to be added
AttributeSet
that contains the attributes
of old
plus the new attributes in
attributes
AttributeSet getEmptySet()
AttributeSet
.
AttributeSet
void reclaim(AttributeSet attributes)
attributes
are
no longer used.
attributes
- the attributes are no longer usedAttributeSet removeAttribute(AttributeSet old, Object name)
AttributeSet
that has the attribute with the specified
name
removed from old
.
old
- the attribute set from which an attribute is removedname
- the name of the attribute to be removed
old
minus the attribute
specified by name
AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes)
attributes
from old
and returns the resulting AttributeSet
.
old
- the set of attributes from which to remove attributesattributes
- the attributes to be removed from old
old
minus the attributes in
attributes
AttributeSet removeAttributes(AttributeSet old, Enumeration<?> names)
names
from
old
and returns the resulting AttributeSet
.
old
- the set of attributes from which to remove attributesnames
- the names of the attributes to be removed from
old
old
minus the attributes in
attributes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |