AttributeSet
StyleContext
public class StyleContext.SmallAttributeSet extends Object implements AttributeSet
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
NameAttribute, ResolveAttribute
Constructor | Description |
---|---|
SmallAttributeSet |
Constructs a SmallAttributeSet. |
SmallAttributeSet |
Constructs a SmallAttributeSet. |
Modifier and Type | Method | Description |
---|---|---|
Object |
clone() |
Clones a set of attributes. |
boolean |
containsAttribute |
Checks whether a given attribute name/value is defined. |
boolean |
containsAttributes |
Checks whether the attribute set contains all of the given attributes. |
AttributeSet |
copyAttributes() |
Copies a set of attributes. |
boolean |
equals |
Compares this object to the specified object. |
Object |
getAttribute |
Gets the value of an attribute. |
int |
getAttributeCount() |
Gets the number of attributes that are defined. |
Enumeration |
getAttributeNames() |
Gets the names of all attributes. |
AttributeSet |
getResolveParent() |
If not overridden, the resolving parent defaults to the parent element. |
int |
hashCode() |
Returns a hashcode for this set of attributes. |
boolean |
isDefined |
Checks whether a given attribute is defined. |
boolean |
isEqual |
Checks whether two attribute sets are equal. |
String |
toString() |
Returns a string showing the key/value pairs. |
public SmallAttributeSet(Object[] attributes)
attributes
- the attributespublic SmallAttributeSet(AttributeSet attrs)
attrs
- the attributespublic String toString()
public int hashCode()
public boolean equals(Object obj)
true
if the object is an equivalent set of attributes.public Object clone()
public int getAttributeCount()
getAttributeCount
in interface AttributeSet
public boolean isDefined(Object key)
isDefined
in interface AttributeSet
key
- the attribute keypublic boolean isEqual(AttributeSet attr)
isEqual
in interface AttributeSet
attr
- the attribute set to check againstpublic AttributeSet copyAttributes()
copyAttributes
in interface AttributeSet
public Object getAttribute(Object key)
getAttribute
in interface AttributeSet
key
- the attribute namepublic Enumeration<?> getAttributeNames()
getAttributeNames
in interface AttributeSet
public boolean containsAttribute(Object name, Object value)
containsAttribute
in interface AttributeSet
name
- the attribute namevalue
- the attribute valuepublic boolean containsAttributes(AttributeSet attrs)
containsAttributes
in interface AttributeSet
attrs
- the attributes to checkpublic AttributeSet getResolveParent()
getResolveParent
in interface AttributeSet
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/StyleContext.SmallAttributeSet.html