Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.StyleContext.SmallAttributeSet
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.
Modifier and Type | Interface and Description |
---|
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet |
---|
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
Modifier and Type | Field and Description |
---|
Fields inherited from interface javax.swing.text.AttributeSet |
---|
NameAttribute, ResolveAttribute |
Constructor and Description |
---|
StyleContext.SmallAttributeSet(AttributeSet attrs)
|
StyleContext.SmallAttributeSet(Object[] attributes)
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones a set of attributes. |
boolean |
containsAttribute(Object name,
Object value)
Checks whether a given attribute name/value is defined. |
boolean |
containsAttributes(AttributeSet attrs)
Checks whether the attribute set contains all of the given attributes. |
AttributeSet |
copyAttributes()
Copies a set of attributes. |
boolean |
equals(Object obj)
Compares this object to the specifed object. |
Object |
getAttribute(Object key)
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 overriden, the resolving parent defaults to the parent element. |
int |
hashCode()
Returns a hashcode for this set of attributes. |
boolean |
isDefined(Object key)
Checks whether a given attribute is defined. |
boolean |
isEqual(AttributeSet attr)
Checks whether two attribute sets are equal. |
String |
toString()
Returns a string showing the key/value pairs |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StyleContext.SmallAttributeSet(Object[] attributes)
public StyleContext.SmallAttributeSet(AttributeSet attrs)
Method Detail |
---|
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.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 with.true
if the objects are equal;
false
otherwise.Object.hashCode()
,
HashMap
public Object clone()
clone
in class Object
Cloneable
public int getAttributeCount()
getAttributeCount
in interface AttributeSet
AttributeSet.getAttributeCount()
public boolean isDefined(Object key)
isDefined
in interface AttributeSet
key
- the attribute keyAttributeSet.isDefined(java.lang.Object)
public boolean isEqual(AttributeSet attr)
isEqual
in interface AttributeSet
attr
- the attribute set to check againstAttributeSet.isEqual(javax.swing.text.AttributeSet)
public AttributeSet copyAttributes()
copyAttributes
in interface AttributeSet
AttributeSet.copyAttributes()
public Object getAttribute(Object key)
getAttribute
in interface AttributeSet
key
- the attribute nameAttributeSet.getAttribute(java.lang.Object)
public Enumeration<?> getAttributeNames()
getAttributeNames
in interface AttributeSet
AttributeSet.getAttributeNames()
public boolean containsAttribute(Object name, Object value)
containsAttribute
in interface AttributeSet
name
- the attribute namevalue
- the attribute valueAttributeSet.containsAttribute(java.lang.Object, java.lang.Object)
public boolean containsAttributes(AttributeSet attrs)
containsAttributes
in interface AttributeSet
attrs
- the attributes to checkAttributeSet.containsAttributes(javax.swing.text.AttributeSet)
public AttributeSet getResolveParent()
getResolveParent
in interface AttributeSet
AttributeSet.getResolveParent()
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.