This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text
class StyleContext.SmallAttributeSet

java.lang.Object extended by javax.swing.text.StyleContext.SmallAttributeSet
All Implemented Interfaces:
AttributeSet
Enclosing class:
StyleContext

public class StyleContext.SmallAttributeSet
extends Object
implements AttributeSet

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 sharable form.


Constructor Summary

          

          
 
Method Summary
 Object

          Clones a set of attributes.
 boolean

          Checks whether a given attribute name/value is defined.
 boolean

          Checks whether the attribute set contains all of the given attributes.
 AttributeSet

          Copies a set of attributes.
 boolean

          Compares this object to the specifed object.
 Object

          Gets the value of an attribute.
 int

          Gets the number of attributes that are defined.
 Enumeration

          Gets the names of all attributes.
 AttributeSet

          If not overriden, the resolving parent defaults to the parent element.
 int

          Returns a hashcode for this set of attributes.
 boolean

          Checks whether a given attribute is defined.
 boolean

          Checks whether two attribute sets are equal.
 String

          Returns a string showing the key/value pairs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleContext.SmallAttributeSet

public StyleContext.SmallAttributeSet(AttributeSet attrs)
Parameters:
attrs

StyleContext.SmallAttributeSet

public StyleContext.SmallAttributeSet(Object[] attributes)
Parameters:
attributes
Method Detail

clone

public Object clone()
Clones a set of attributes. Since the set is immutable, a clone is basically the same set.

Overrides:
clone in class Object
Returns:
the set of attributes

containsAttribute

public boolean containsAttribute(Object name,
                                 Object value)
Checks whether a given attribute name/value is defined.

Parameters:
name - the attribute name
value - the attribute value
Returns:
true if the name/value is defined

containsAttributes

public boolean containsAttributes(AttributeSet attrs)
Checks whether the attribute set contains all of the given attributes.

Parameters:
attrs - the attributes to check
Returns:
true if the element contains all the attributes

copyAttributes

public AttributeSet copyAttributes()
Copies a set of attributes.

Returns:
the copy

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if the object is an equivalent set of attributes.

Overrides:
equals in class Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are equal; false otherwise.

getAttribute

public Object getAttribute(Object key)
Gets the value of an attribute.

Parameters:
key - the attribute name
Returns:
the attribute value

getAttributeCount

public int getAttributeCount()
Gets the number of attributes that are defined.

Returns:
the number of attributes

getAttributeNames

public Enumeration getAttributeNames()
Gets the names of all attributes.

Returns:
the attribute names

getResolveParent

public AttributeSet getResolveParent()
If not overriden, the resolving parent defaults to the parent element.

Returns:
the attributes from the parent

hashCode

public int hashCode()
Returns a hashcode for this set of attributes.

Overrides:
hashCode in class Object
Returns:
a hashcode value for this set of attributes.

isDefined

public boolean isDefined(Object key)
Checks whether a given attribute is defined.

Parameters:
key - the attribute key
Returns:
true if the attribute is defined

isEqual

public boolean isEqual(AttributeSet attr)
Checks whether two attribute sets are equal.

Parameters:
attr - the attribute set to check against
Returns:
true if the same

toString

public String toString()
Returns a string showing the key/value pairs

Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.