Java Doc for AttributeSet.java in  » 6.0-JDK-Core » swing » javax » swing » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.text.AttributeSet

All known Subclasses:   javax.swing.text.rtf.MockAttributeSet,  javax.swing.text.html.MuxingAttributeSet,
AttributeSet
public interface AttributeSet (Code)
A collection of unique attributes. This is a read-only, immutable interface. An attribute is basically a key and a value assigned to the key. The collection may represent something like a style run, a logical style, etc. These are generally used to describe features that will contribute to some graphical representation such as a font. The set of possible keys is unbounded and can be anything. Typically View implementations will respond to attribute definitions and render something to represent the attributes.

Attributes can potentially resolve in a hierarchy. If a key doesn't resolve locally, and a resolving parent exists, the key will be resolved through the parent.
author:
   Timothy Prinzing
version:
   1.47 05/05/07
See Also:   MutableAttributeSet


Inner Class :public interface FontAttribute
Inner Class :public interface ColorAttribute
Inner Class :public interface CharacterAttribute
Inner Class :public interface ParagraphAttribute

Field Summary
final public static  ObjectNameAttribute
     Attribute name used to name the collection of attributes.
final public static  ObjectResolveAttribute
     Attribute name used to identify the resolving parent set of attributes, if one is defined.


Method Summary
public  booleancontainsAttribute(Object name, Object value)
     Returns true if this set defines an attribute with the same name and an equal value.
public  booleancontainsAttributes(AttributeSet attributes)
     Returns true if this set defines all the attributes from the given set with equal values.
public  AttributeSetcopyAttributes()
     Returns an attribute set that is guaranteed not to change over time.
public  ObjectgetAttribute(Object key)
     Fetches the value of the given attribute.
public  intgetAttributeCount()
     Returns the number of attributes that are defined locally in this set.
public  EnumerationgetAttributeNames()
     Returns an enumeration over the names of the attributes that are defined locally in the set.
public  AttributeSetgetResolveParent()
     Gets the resolving parent.
public  booleanisDefined(Object attrName)
     Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
public  booleanisEqual(AttributeSet attr)
     Determines if the two attribute sets are equivalent.

Field Detail
NameAttribute
final public static Object NameAttribute(Code)
Attribute name used to name the collection of attributes.



ResolveAttribute
final public static Object ResolveAttribute(Code)
Attribute name used to identify the resolving parent set of attributes, if one is defined.





Method Detail
containsAttribute
public boolean containsAttribute(Object name, Object value)(Code)
Returns true if this set defines an attribute with the same name and an equal value. If such an attribute is not found locally, it is searched through in the resolving parent hierarchy.
Parameters:
  name - the non-null attribute name
Parameters:
  value - the value true if the set defines the attribute with anequal value, either locally or through its resolving parent
throws:
  NullPointerException - if either name or value is null



containsAttributes
public boolean containsAttributes(AttributeSet attributes)(Code)
Returns true if this set defines all the attributes from the given set with equal values. If an attribute is not found locally, it is searched through in the resolving parent hierarchy.
Parameters:
  attributes - the set of attributes to check against true if this set defines all the attributes with equalvalues, either locally or through its resolving parent
throws:
  NullPointerException - if attributes is null



copyAttributes
public AttributeSet copyAttributes()(Code)
Returns an attribute set that is guaranteed not to change over time. a copy of the attribute set



getAttribute
public Object getAttribute(Object key)(Code)
Fetches the value of the given attribute. If the value is not found locally, the search is continued upward through the resolving parent (if one exists) until the value is either found or there are no more parents. If the value is not found, null is returned.
Parameters:
  key - the non-null key of the attribute binding the value of the attribute, or null if not found



getAttributeCount
public int getAttributeCount()(Code)
Returns the number of attributes that are defined locally in this set. Attributes that are defined in the parent set are not included. the number of attributes >= 0



getAttributeNames
public Enumeration getAttributeNames()(Code)
Returns an enumeration over the names of the attributes that are defined locally in the set. Names of attributes defined in the resolving parent, if any, are not included. The values of the Enumeration may be anything and are not constrained to a particular Object type.

This method never returns null . For a set with no attributes, it returns an empty Enumeration . the names




getResolveParent
public AttributeSet getResolveParent()(Code)
Gets the resolving parent. the parent



isDefined
public boolean isDefined(Object attrName)(Code)
Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
Parameters:
  attrName - the attribute name true if the attribute has a value specified



isEqual
public boolean isEqual(AttributeSet attr)(Code)
Determines if the two attribute sets are equivalent.
Parameters:
  attr - an attribute set true if the sets are equivalent



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.