|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.SimpleAttributeSet
Safe:
Field Summary | |
static AttributeSet |
EMPTY
Suppressed: An empty attribute set. |
private static Enumeration |
emptyEnumeration
|
private Hashtable |
table
|
Fields inherited from interface javax.swing.text.AttributeSet |
NameAttribute, ResolveAttribute |
Constructor Summary | |
|
SimpleAttributeSet()
Enabled: Creates a new attribute set. |
|
SimpleAttributeSet(AttributeSet source)
Enabled: Creates a new attribute set based on a supplied set of attributes. |
private |
SimpleAttributeSet(Hashtable table)
|
Method Summary | |
void |
addAttribute(Object name,
Object value)
Enabled: Adds an attribute to the list. |
void |
addAttributes(AttributeSet attributes)
Enabled: Adds a set of attributes to the list. |
Object |
clone()
Suppressed: Clones a set of attributes. |
boolean |
containsAttribute(Object name,
Object value)
Enabled: Checks whether the attribute list contains a specified attribute name/value pair. |
boolean |
containsAttributes(AttributeSet attributes)
Enabled: Checks whether the attribute list contains all the specified name/value pairs. |
AttributeSet |
copyAttributes()
Enabled: Makes a copy of the attributes. |
boolean |
equals(Object obj)
Suppressed: Compares this object to the specified object. |
Object |
getAttribute(Object name)
Enabled: Gets the value of an attribute. |
int |
getAttributeCount()
Enabled: Gets a count of the number of attributes. |
Enumeration |
getAttributeNames()
Enabled: Gets the names of the attributes in the set. |
private static Enumeration |
getEmptyEnumeration()
|
AttributeSet |
getResolveParent()
Enabled: Gets the resolving parent. |
int |
hashCode()
Suppressed: Returns a hashcode for this set of attributes. |
boolean |
isDefined(Object attrName)
Enabled: Tells whether a given attribute is defined. |
boolean |
isEmpty()
Enabled: Checks whether the set of attributes is empty. |
boolean |
isEqual(AttributeSet attr)
Enabled: Compares two attribute sets. |
private void |
readObject(ObjectInputStream s)
|
void |
removeAttribute(Object name)
Enabled: Removes an attribute from the list. |
void |
removeAttributes(AttributeSet attributes)
Enabled: Removes a set of attributes from the list. |
void |
removeAttributes(Enumeration names)
Enabled: Removes a set of attributes from the list. |
void |
setResolveParent(AttributeSet parent)
Enabled: Sets the resolving parent. |
String |
toString()
Suppressed: Converts the attribute set to a String. |
private void |
writeObject(ObjectOutputStream s)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final AttributeSet EMPTY
private transient Hashtable table
private static Enumeration emptyEnumeration
Constructor Detail |
public SimpleAttributeSet()
public SimpleAttributeSet(AttributeSet source)
source
- the set of attributesprivate SimpleAttributeSet(Hashtable table)
Method Detail |
public boolean isEmpty()
public int getAttributeCount()
getAttributeCount
in interface AttributeSet
public boolean isDefined(Object attrName)
isDefined
in interface AttributeSet
attrName
- the attribute name
public boolean isEqual(AttributeSet attr)
isEqual
in interface AttributeSet
attr
- the second attribute set
public AttributeSet copyAttributes()
copyAttributes
in interface AttributeSet
public Enumeration getAttributeNames()
getAttributeNames
in interface AttributeSet
Enumeration
public Object getAttribute(Object name)
getAttribute
in interface AttributeSet
name
- the attribute name
public boolean containsAttribute(Object name, Object value)
containsAttribute
in interface AttributeSet
name
- the namevalue
- the value
public boolean containsAttributes(AttributeSet attributes)
containsAttributes
in interface AttributeSet
attributes
- the attribute list
public void addAttribute(Object name, Object value)
addAttribute
in interface MutableAttributeSet
name
- the attribute namevalue
- the attribute valuepublic void addAttributes(AttributeSet attributes)
addAttributes
in interface MutableAttributeSet
attributes
- the set of attributes to addpublic void removeAttribute(Object name)
removeAttribute
in interface MutableAttributeSet
name
- the attribute namepublic void removeAttributes(Enumeration names)
removeAttributes
in interface MutableAttributeSet
names
- the set of names to removepublic void removeAttributes(AttributeSet attributes)
removeAttributes
in interface MutableAttributeSet
attributes
- the set of attributes to removepublic AttributeSet getResolveParent()
getResolveParent
in interface AttributeSet
public void setResolveParent(AttributeSet parent)
setResolveParent
in interface MutableAttributeSet
parent
- the parentpublic Object clone()
clone
in class Object
java.lang.Cloneable
public int hashCode()
hashCode
in class Object
java.lang.Object#equals(java.lang.Object)
,
java.util.Hashtable
public boolean equals(Object obj)
true
if the object is an equivalent
set of attributes.
equals
in class Object
obj
- the object to compare this attribute set with
true
if the objects are equal;
false
otherwiseObject.hashCode()
,
java.util.Hashtable
public String toString()
toString
in class Object
private void writeObject(ObjectOutputStream s) throws IOException
IOException
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
private static Enumeration getEmptyEnumeration()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |