KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > svg > SVGItem


1 /*
2
3    Copyright 2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */
package org.apache.batik.dom.svg;
18
19 /**
20  * This interface represents an item in an SVGXXXList.
21  *
22  * The item is required to hold a reference to its parent
23  * list so that an item can be moved from one list to another.
24  *
25  * A string representation of the item is also required in order
26  * to update the value of the attribute the list containing
27  * the item represents.
28  *
29  * If the value of the item is changed, it is required
30  * to notify the list it belongs to in order to synchronized
31  * the list and the attribute the list represents.
32  *
33  * @see AbstractSVGList#itemChanged()
34  *
35  * @author <a HREF="mailto:nicolas.socheleau@bitflash.com">Nicolas Socheleau</a>
36  * @version $Id: SVGItem.java,v 1.3 2004/08/18 07:13:14 vhardy Exp $
37  */

38 public interface SVGItem {
39
40     /**
41      * Associates an item to an SVGXXXList
42      *
43      * @param list list the item belongs to.
44      */

45     void setParent(AbstractSVGList list);
46
47     /**
48      * Return the list the item belongs to.
49      *
50      * @return list the item belongs to. This
51      * could be if the item belongs to no list.
52      */

53     AbstractSVGList getParent();
54
55     /**
56      * Return the String representation of the item.
57      *
58      * @return textual representation of the item
59      * to be inserted in the attribute value
60      * representing the list.
61      */

62     String JavaDoc getValueAsString();
63 }
64
Popular Tags