|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
javax.swing.text
Interface AbstractDocument.AttributeContext

- All Known Implementing Classes:
- StyleContext
- Enclosing interface:
- AbstractDocument
- public static interface AbstractDocument.AttributeContext
Defines a set of methods for managing text attributes for one or more
Document
s.
Replicating AttributeSets throughout a Document
can
be very expensive. Implementations of this interface are intended to
provide intelligent management of AttributeSet
s, eliminating
costly duplication.
Method Summary | |
AttributeSet |
addAttribute(AttributeSet old,
java.lang.Object name,
java.lang.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,
java.lang.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,
java.util.Enumeration names)
Removes all attributes specified by names from
old and returns the resulting AttributeSet . |
Method Detail |
addAttribute
public AttributeSet addAttribute(AttributeSet old, java.lang.Object name, java.lang.Object value)
- Returns an AttributeSet that contains the attributes
of
old
plus the new attribute specified byname
andvalue
.
addAttributes
public AttributeSet addAttributes(AttributeSet old, AttributeSet attributes)
- Returns an AttributeSet that contains the attributes
of
old
plus the new attributes inattributes
.
getEmptySet
public AttributeSet getEmptySet()
- Returns an empty AttributeSet.
reclaim
public void reclaim(AttributeSet attributes)
- Called to indicate that the attributes in
attributes
are no longer used.
removeAttribute
public AttributeSet removeAttribute(AttributeSet old, java.lang.Object name)
- Returns a AttributeSet that has the attribute with the specified
name
removed fromold
.
removeAttributes
public AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes)
- Removes all attributes in
attributes
fromold
and returns the resultingAttributeSet
.
removeAttributes
public AttributeSet removeAttributes(AttributeSet old, java.util.Enumeration names)
- Removes all attributes specified by
names
fromold
and returns the resultingAttributeSet
.
|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |