|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.rtf.MockAttributeSet
Nested Class Summary |
Nested classes inherited from class javax.swing.text.AttributeSet |
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
Field Summary | |
Dictionary |
backing
|
Fields inherited from interface javax.swing.text.AttributeSet |
NameAttribute, ResolveAttribute |
Constructor Summary | |
(package private) |
MockAttributeSet()
|
Method Summary | |
void |
addAttribute(Object name,
Object value)
Creates a new attribute set similar to this one except that it contains an attribute with the given name and value. |
void |
addAttributes(AttributeSet attr)
Creates a new attribute set similar to this one except that it contains the given attributes and values. |
boolean |
containsAttribute(Object name,
Object value)
Returns true if this set contains this attribute with an equal value. |
boolean |
containsAttributes(AttributeSet attr)
Returns true if this set contains all the attributes with equal values. |
AttributeSet |
copyAttributes()
Returns an attribute set that is guaranteed not to change over time. |
Object |
getAttribute(Object name)
Fetches the value of the given attribute. |
int |
getAttributeCount()
Returns the number of attributes contained in this set. |
Enumeration |
getAttributeNames()
Returns an enumeration over the names of the attributes in the set. |
AttributeSet |
getResolveParent()
Gets the resolving parent. |
boolean |
isDefined(Object name)
Checks whether the named attribute has a value specified in the set without resolving through another attribute set. |
boolean |
isEmpty()
|
boolean |
isEqual(AttributeSet attr)
Determines if the two attribute sets are equivalent. |
void |
removeAttribute(Object name)
Removes an attribute with the given name . |
void |
removeAttributes(AttributeSet attr)
Removes a set of attributes with the given name . |
void |
removeAttributes(Enumeration en)
Removes an attribute set with the given names . |
void |
setResolveParent(AttributeSet pp)
Sets the resolving parent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Dictionary backing
Constructor Detail |
MockAttributeSet()
Method Detail |
public boolean isEmpty()
public int getAttributeCount()
AttributeSet
getAttributeCount
in interface AttributeSet
public boolean isDefined(Object name)
AttributeSet
isDefined
in interface AttributeSet
name
- the attribute name
public boolean isEqual(AttributeSet attr)
AttributeSet
isEqual
in interface AttributeSet
attr
- an attribute set
public AttributeSet copyAttributes()
AttributeSet
copyAttributes
in interface AttributeSet
public Object getAttribute(Object name)
AttributeSet
getAttribute
in interface AttributeSet
name
- the non-null key of the attribute binding
public void addAttribute(Object name, Object value)
MutableAttributeSet
addAttribute
in interface MutableAttributeSet
name
- the namevalue
- the valuepublic void addAttributes(AttributeSet attr)
MutableAttributeSet
addAttributes
in interface MutableAttributeSet
attr
- the set of attributespublic void removeAttribute(Object name)
MutableAttributeSet
name
.
removeAttribute
in interface MutableAttributeSet
name
- the attribute namepublic void removeAttributes(AttributeSet attr)
MutableAttributeSet
name
.
removeAttributes
in interface MutableAttributeSet
attr
- the set of attributespublic void removeAttributes(Enumeration en)
MutableAttributeSet
names
.
removeAttributes
in interface MutableAttributeSet
en
- the set of namespublic void setResolveParent(AttributeSet pp)
MutableAttributeSet
setResolveParent
in interface MutableAttributeSet
pp
- the parentpublic Enumeration getAttributeNames()
AttributeSet
Enumeration
may be anything
and are not constrained to a particular Object
type.
The set does not include the resolving parent, if one is defined.
getAttributeNames
in interface AttributeSet
public boolean containsAttribute(Object name, Object value)
AttributeSet
containsAttribute
in interface AttributeSet
name
- the non-null attribute namevalue
- the value
public boolean containsAttributes(AttributeSet attr)
AttributeSet
containsAttributes
in interface AttributeSet
attr
- the set of attributes to check against
public AttributeSet getResolveParent()
AttributeSet
getResolveParent
in interface AttributeSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |