KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > text > MutableAttributeSet


1 /*
2  * @(#)MutableAttributeSet.java 1.17 04/05/05
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.swing.text;
8
9 import java.util.Enumeration JavaDoc;
10
11 /**
12  * A generic interface for a mutable collection of unique attributes.
13  *
14  * Implementations will probably want to provide a constructor of the
15  * form:<tt>
16  * public XXXAttributeSet(ConstAttributeSet source);</tt>
17  *
18  * @version 1.17 05/05/04
19  */

20 public interface MutableAttributeSet extends AttributeSet JavaDoc {
21
22     /**
23      * Creates a new attribute set similar to this one except that it contains
24      * an attribute with the given name and value. The object must be
25      * immutable, or not mutated by any client.
26      *
27      * @param name the name
28      * @param value the value
29      */

30     public void addAttribute(Object JavaDoc name, Object JavaDoc value);
31
32     /**
33      * Creates a new attribute set similar to this one except that it contains
34      * the given attributes and values.
35      *
36      * @param attributes the set of attributes
37      */

38     public void addAttributes(AttributeSet JavaDoc attributes);
39
40     /**
41      * Removes an attribute with the given <code>name</code>.
42      *
43      * @param name the attribute name
44      */

45     public void removeAttribute(Object JavaDoc name);
46
47     /**
48      * Removes an attribute set with the given <code>names</code>.
49      *
50      * @param names the set of names
51      */

52     public void removeAttributes(Enumeration JavaDoc<?> names);
53
54     /**
55      * Removes a set of attributes with the given <code>name</code>.
56      *
57      * @param attributes the set of attributes
58      */

59     public void removeAttributes(AttributeSet JavaDoc attributes);
60
61     /**
62      * Sets the resolving parent. This is the set
63      * of attributes to resolve through if an attribute
64      * isn't defined locally.
65      *
66      * @param parent the parent
67      */

68     public void setResolveParent(AttributeSet JavaDoc parent);
69
70 }
71
72
73
74
75
76
77
78
79
80
81
82
Popular Tags