Class StyleContext.SmallAttributeSet
java.lang.Object
javax.swing.text.StyleContext.SmallAttributeSet
- All Implemented Interfaces:
- AttributeSet
- Enclosing class:
- StyleContext
This class holds a small number of attributes in an array.
 The storage format is key, value, key, value, etc.  The size
 of the set is the length of the array divided by two.  By
 default, this is the class that will be used to store attributes
 when held in the compact shareable form.
- 
Nested Class SummaryNested classes/interfaces declared in interface javax.swing.text.AttributeSetAttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
- 
Field SummaryFields declared in interface javax.swing.text.AttributeSetNameAttribute, ResolveAttribute
- 
Constructor SummaryConstructorsConstructorDescriptionSmallAttributeSet(Object[] attributes) Constructs a SmallAttributeSet.SmallAttributeSet(AttributeSet attrs) Constructs a SmallAttributeSet.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Clones a set of attributes.booleancontainsAttribute(Object name, Object value) Checks whether a given attribute name/value is defined.booleancontainsAttributes(AttributeSet attrs) Checks whether the attribute set contains all of the given attributes.Copies a set of attributes.booleanCompares this object to the specified object.getAttribute(Object key) Gets the value of an attribute.intGets the number of attributes that are defined.Enumeration<?> Gets the names of all attributes.If not overridden, the resolving parent defaults to the parent element.inthashCode()Returns a hashcode for this set of attributes.booleanChecks whether a given attribute is defined.booleanisEqual(AttributeSet attr) Checks whether two attribute sets are equal.toString()Returns a string showing the key/value pairs.
- 
Constructor Details- 
SmallAttributeSetConstructs a SmallAttributeSet.- Parameters:
- attributes- the attributes
 
- 
SmallAttributeSetConstructs a SmallAttributeSet.- Parameters:
- attrs- the attributes
 
 
- 
- 
Method Details- 
toString
- 
hashCode
- 
equals
- 
clone
- 
getAttributeCountpublic int getAttributeCount()Gets the number of attributes that are defined.- Specified by:
- getAttributeCountin interface- AttributeSet
- Returns:
- the number of attributes
- See Also:
 
- 
isDefinedChecks whether a given attribute is defined.- Specified by:
- isDefinedin interface- AttributeSet
- Parameters:
- key- the attribute key
- Returns:
- true if the attribute is defined
- See Also:
 
- 
isEqualChecks whether two attribute sets are equal.- Specified by:
- isEqualin interface- AttributeSet
- Parameters:
- attr- the attribute set to check against
- Returns:
- true if the same
- See Also:
 
- 
copyAttributesCopies a set of attributes.- Specified by:
- copyAttributesin interface- AttributeSet
- Returns:
- the copy
- See Also:
 
- 
getAttributeGets the value of an attribute.- Specified by:
- getAttributein interface- AttributeSet
- Parameters:
- key- the attribute name
- Returns:
- the attribute value
- See Also:
 
- 
getAttributeNamesGets the names of all attributes.- Specified by:
- getAttributeNamesin interface- AttributeSet
- Returns:
- the attribute names
- See Also:
 
- 
containsAttributeChecks whether a given attribute name/value is defined.- Specified by:
- containsAttributein interface- AttributeSet
- Parameters:
- name- the attribute name
- value- the attribute value
- Returns:
- true if the name/value is defined
- See Also:
 
- 
containsAttributesChecks whether the attribute set contains all of the given attributes.- Specified by:
- containsAttributesin interface- AttributeSet
- Parameters:
- attrs- the attributes to check
- Returns:
- true if the element contains all the attributes
- See Also:
 
- 
getResolveParentIf not overridden, the resolving parent defaults to the parent element.- Specified by:
- getResolveParentin interface- AttributeSet
- Returns:
- the attributes from the parent
- See Also:
 
 
-