1 | package org.columba.addressbook.config;↵ | | 1 | package org.columba.mail.config;↵
|
|
2 | import org.columba.core.config.DefaultItem;↵ | | 2 | import org.columba.core.config.DefaultItem;↵
|
3 | import org.columba.core.xml.XmlElement;↵ | | 3 | import org.columba.core.xml.XmlElement;↵
|
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Convinience wrapper for a contact folder configuration.↵ | | 5 | * ↵
|
6 | * ↵ | | 6 | @version 1.0↵
|
7 | * @author fdietz↵ | | 7 | * @author↵
|
8 | */↵ | | 8 | */↵
|
9 | public class FolderItem extends DefaultItem {↵ | | 9 | public class SpellcheckItem extends DefaultItem {↵
|
10 | /*↵ | | 10 | ↵
|
11 | AdapterNode name;↵ | | |
|
12 | AdapterNode uid;↵ | | |
|
13 | AdapterNode type;↵ | | |
|
14 | AdapterNode rootNode;↵ | | |
|
15 | */↵ | | |
|
16 | public FolderItem(XmlElement root) {↵ | | |
|
17 | super(root);↵ | | |
|
|
18 | /*↵ | | |
|
19 | this.rootNode = root;↵ | | |
|
|
20 | parse();↵ | | |
|
|
21 | createMissingElements();↵ | | |
|
22 | */↵ | | |
|
|
23 | //filterList = new Vector();↵ | | |
|
24 | }↵ | | |
|
|
25 | /*↵ | | |
|
26 | protected void parse()↵ | | |
|
27 | {↵ | | |
|
28 | for (int i = 0; i < getRootNode().getChildCount(); i++)↵ | | |
|
29 | {↵ | | |
|
30 | AdapterNode child = getRootNode().getChildAt(i);↵ | | |
|
|
31 | if (child.getName().equals("name"))↵ | | |
|
32 | {↵ | | |
|
33 | name = child;↵ | | |
|
34 | }↵ | | |
|
35 | else if (child.getName().equals("uid"))↵ | | |
|
36 | {↵ | | |
|
37 | uid = child;↵ | | |
|
38 | }↵ | | |
|
39 | else if (child.getName().equals("type"))↵ | | |
|
40 | {↵ | | |
|
41 | type = child;↵ | | |
|
42 | }↵ | | |
|
|
43 | }↵ | | |
|
44 | }↵ | | |
|
|
45 | protected void createMissingElements()↵ | | |
|
46 | {↵ | | |
|
|
47 | }↵ | | |
|
|
48 | public AdapterNode getRootNode()↵ | | |
|
49 | {↵ | | |
|
50 | return rootNode;↵ | | |
|
51 | }↵ | | |
|
|
52 | public void setUid(int i)↵ | | |
|
53 | {↵ | | |
|
54 | Integer h = new Integer(i);↵ | | |
|
|
55 | setTextValue(uid, h.toString());↵ | | |
|
56 | }↵ | | |
|
|
57 | public void setName(String str)↵ | | |
|
58 | {↵ | | |
|
59 | setTextValue(name, str);↵ | | |
|
60 | }↵ | | |
|
|
61 | public int getUid()↵ | | |
|
62 | {↵ | | |
|
63 | if ( uid != null )↵ | | |
|
64 | {↵ | | |
|
65 | Integer i = new Integer(getTextValue(uid)↵ | | 11 | public SpellcheckItem(XmlElement root) {↵
|
66 | );↵ | | 12 | super(root);↵
|
| | | 13 |
↵
|
67 | return i.intValue();↵ | | 14 | ↵
|
68 | }↵ | | |
|
69 | else↵ | | |
|
70 | {↵ | | |
|
71 | return -1;↵ | | |
|
72 | }↵ | | |
|
73 | }↵ | | |
|
|
74 | public String getName()↵ | | |
|
75 | {↵ | | |
|
76 | if ( name != null )↵ | | |
|
77 | return getTextValue(name);↵ | | |
|
78 | else↵ | | |
|
79 | return "";↵ | | |
|
80 | }↵ | | |
|
|
81 | public String getType()↵ | | |
|
82 | {↵ | | |
|
83 | return getTextValue(type);↵ | | |
|
84 | }↵ | | |
|
85 | */↵ | | 15 | }↵
|
86 | }
| | 16 | }
|