Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.SimpleAttributeSet
A straightforward implementation of MutableAttributeSet using a hash table.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.
Inner classes inherited from class javax.swing.text.AttributeSet |
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
Field Summary | |
static AttributeSet |
EMPTY
An empty attribute set. |
Fields inherited from interface javax.swing.text.AttributeSet |
NameAttribute, ResolveAttribute |
Constructor Summary | |
SimpleAttributeSet()
Creates a new attribute set. |
|
SimpleAttributeSet(AttributeSet source)
Creates a new attribute set based on a supplied set of attributes. |
Method Summary | |
void |
addAttribute(Object name,
Object value)
Adds an attribute to the list. |
void |
addAttributes(AttributeSet attributes)
Adds a set of attributes to the list. |
Object |
clone()
Clones a set of attributes. |
boolean |
containsAttribute(Object name,
Object value)
Checks whether the attribute list contains a specified attribute name/value pair. |
boolean |
containsAttributes(AttributeSet attributes)
Checks whether the attribute list contains all the specified name/value pairs. |
AttributeSet |
copyAttributes()
Makes a copy of the attributes. |
boolean |
equals(Object obj)
Compares this object to the specifed object. |
Object |
getAttribute(Object name)
Gets the value of an attribute. |
int |
getAttributeCount()
Gets a count of the number of attributes. |
Enumeration |
getAttributeNames()
Gets the names of the attributes in the set. |
AttributeSet |
getResolveParent()
Gets the resolving parent. |
int |
hashCode()
Returns a hashcode for this set of attributes. |
boolean |
isDefined(Object attrName)
Tells whether a given attribute is defined. |
boolean |
isEmpty()
Checks whether the set of attributes is empty. |
boolean |
isEqual(AttributeSet attr)
Compares two attribute sets. |
void |
removeAttribute(Object name)
Removes an attribute from the list. |
void |
removeAttributes(AttributeSet attributes)
Removes a set of attributes from the list. |
void |
removeAttributes(Enumeration names)
Removes a set of attributes from the list. |
void |
setResolveParent(AttributeSet parent)
Sets the resolving parent. |
String |
toString()
Converts the attribute set to a String. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final AttributeSet EMPTY
Constructor Detail |
public SimpleAttributeSet()
public SimpleAttributeSet(AttributeSet source)
source
- the set of attributesMethod Detail |
public boolean isEmpty()
public int getAttributeCount()
getAttributeCount
in interface AttributeSet
public boolean isDefined(Object attrName)
isDefined
in interface AttributeSet
attrName
- the attribute namepublic boolean isEqual(AttributeSet attr)
isEqual
in interface AttributeSet
attr
- the second attribute setpublic AttributeSet copyAttributes()
copyAttributes
in interface AttributeSet
public Enumeration getAttributeNames()
getAttributeNames
in interface AttributeSet
public Object getAttribute(Object name)
getAttribute
in interface AttributeSet
name
- the attribute namepublic boolean containsAttribute(Object name, Object value)
containsAttribute
in interface AttributeSet
name
- the namevalue
- the valuepublic boolean containsAttributes(AttributeSet attributes)
containsAttributes
in interface AttributeSet
attributes
- the attribute listpublic 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
public int hashCode()
hashCode
in class Object
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 font with.true
if the objects are equal;
false
otherwise.public String toString()
toString
in class Object
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.