|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.html.MuxingAttributeSet
An implementation of AttributeSet
that can multiplex
across a set of AttributeSet
s.
Nested Class Summary | |
private class |
MuxingAttributeSet.MuxingAttributeNameEnumeration
An Enumeration of the Attribute names in a MuxingAttributeSet. |
Nested classes inherited from class javax.swing.text.AttributeSet |
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
Field Summary | |
private AttributeSet[] |
attrs
The AttributeSet s that make up the resulting
AttributeSet . |
Fields inherited from interface javax.swing.text.AttributeSet |
NameAttribute, ResolveAttribute |
Constructor Summary | |
protected |
MuxingAttributeSet()
Creates an empty MuxingAttributeSet . |
|
MuxingAttributeSet(AttributeSet[] attrs)
Creates a MuxingAttributeSet with the passed in
attributes. |
Method Summary | |
boolean |
containsAttribute(Object name,
Object value)
Checks whether a given attribute name/value is defined. |
boolean |
containsAttributes(AttributeSet attrs)
Checks whether the attribute set contains all of the given attributes. |
AttributeSet |
copyAttributes()
Copies a set of attributes. |
Object |
getAttribute(Object key)
Gets the value of an attribute. |
int |
getAttributeCount()
Gets the number of attributes that are defined. |
Enumeration |
getAttributeNames()
Gets the names of all attributes. |
protected AttributeSet[] |
getAttributes()
Returns the AttributeSet s multiplexing too. |
AttributeSet |
getResolveParent()
Returns null, subclasses may wish to do something more intelligent with this. |
protected void |
insertAttributeSetAt(AttributeSet as,
int index)
Inserts as at index . |
boolean |
isDefined(Object key)
Checks whether a given attribute is defined. |
boolean |
isEqual(AttributeSet attr)
Checks whether two attribute sets are equal. |
protected void |
removeAttributeSetAt(int index)
Removes the AttributeSet at index . |
protected void |
setAttributes(AttributeSet[] attrs)
Directly sets the AttributeSet s that comprise this
MuxingAttributeSet . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private AttributeSet[] attrs
AttributeSet
s that make up the resulting
AttributeSet
.
Constructor Detail |
public MuxingAttributeSet(AttributeSet[] attrs)
MuxingAttributeSet
with the passed in
attributes.
protected MuxingAttributeSet()
MuxingAttributeSet
. This is intended for
use by subclasses only, and it is also intended that subclasses will
set the constituent AttributeSet
s before invoking any
of the AttributeSet
methods.
Method Detail |
protected void setAttributes(AttributeSet[] attrs)
AttributeSet
s that comprise this
MuxingAttributeSet
.
protected AttributeSet[] getAttributes()
AttributeSet
s multiplexing too. When the
AttributeSet
s need to be referenced, this should be called.
protected void insertAttributeSetAt(AttributeSet as, int index)
as
at index
. This assumes
the value of index
is between 0 and attrs.length,
inclusive.
protected void removeAttributeSetAt(int index)
index
. This assumes
the value of index
is greater than or equal to 0,
and less than attrs.length.
public int getAttributeCount()
getAttributeCount
in interface AttributeSet
AttributeSet.getAttributeCount()
public boolean isDefined(Object key)
isDefined
in interface AttributeSet
key
- the attribute key
AttributeSet.isDefined(java.lang.Object)
public boolean isEqual(AttributeSet attr)
isEqual
in interface AttributeSet
attr
- the attribute set to check against
AttributeSet.isEqual(javax.swing.text.AttributeSet)
public AttributeSet copyAttributes()
copyAttributes
in interface AttributeSet
AttributeSet.copyAttributes()
public Object getAttribute(Object key)
getAttribute
in interface AttributeSet
key
- the attribute name
AttributeSet.getAttribute(java.lang.Object)
public Enumeration getAttributeNames()
getAttributeNames
in interface AttributeSet
AttributeSet.getAttributeNames()
public boolean containsAttribute(Object name, Object value)
containsAttribute
in interface AttributeSet
name
- the attribute namevalue
- the attribute value
AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)
public boolean containsAttributes(AttributeSet attrs)
containsAttributes
in interface AttributeSet
attrs
- the attributes to check
AttributeSet.containsAttributes(javax.swing.text.AttributeSet)
public AttributeSet getResolveParent()
getResolveParent
in interface AttributeSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |