1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.bea.domingo;
24
25 import java.util.Iterator;
26
27 /***
28 * Represents an item of type rich text.
29 *
30 * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
31 */
32 public interface DRichTextItem extends DBaseItem {
33
34 /***
35 * Embeds an object or an attachment. It can be retrieved later by use
36 * of the pure filename (without path) of the attached file.
37 *
38 * Calls the notes method
39 * <code>embedObject(EmbeddedObject.EMBED_ATTACHMENT, "", source, "")</code>
40 *
41 * @param path source name of the object
42 * @return DEmbeddedObject
43 */
44 DEmbeddedObject embedAttachment(String path);
45
46 /***
47 * Given the name of a file attachment in a rich-text item,
48 * returns the corresponding EmbeddedObject.
49 * <p><b>Note</b>
50 * getEmbeddedObject is not supported under OS/2, under UNIX, and on the
51 * Macintosh.</p>
52 *
53 * @param fileName the embedded attachments filename
54 * @return the embedded object
55 */
56 DEmbeddedObject getEmbeddedAttachment(String fileName);
57
58 /***
59 * All the embedded objects, object links, and file attachments contained
60 * in a rich text item.
61 *
62 * If you need access to OLE/2 embedded objects that exist in a document
63 * but are not part of a rich text item (for example, because the object
64 * was originally created on the document's form), use the EmbeddedObjects
65 * property in Document.
66 *
67 * <p><b>Note</b>
68 * Embedded objects and object links are not supported for OS/2, UNIX, and
69 * the Macintosh. File attachments are.</p>
70 *
71 * @return Iterator an iterator supplying all embedded objects
72 */
73 Iterator getEmbeddedObjects();
74
75 /***
76 * Appends text to the end of a rich text item. The text is rendered in the
77 * current style of the item.
78 *
79 * @param text The text to append.
80 */
81 void appendText(String text);
82
83 /***
84 * Appends one or more new lines (carriage returns) to the end of a
85 * rich-text item.
86 */
87 void addNewLine();
88
89 /***
90 * Appends one or more new lines (carriage returns) to the end of a
91 * rich-text item.
92 *
93 * @param n The number of new lines to append.
94 */
95 void addNewLine(int n);
96
97 /***
98 * Appends one or more new lines (carriage returns) to the end of a
99 * rich-text item.
100 *
101 * @param n The number of new lines to append.
102 * @param newparagraph If true (default), forces the new line to be a
103 * paragraph separator. If false, the new line is added,
104 * but does not force a new paragraph.
105 */
106 void addNewLine(int n, boolean newparagraph);
107
108 /***
109 * Appends one or more tabs to the end of a rich-text item.
110 */
111 void addTab();
112
113 /***
114 * Appends one or more tabs to the end of a rich-text item.
115 *
116 * @param count The number of tabs to append.
117 */
118 void addTab(int count);
119
120 /***
121 * Returns the text of the item without any formatting.
122 *
123 * @return String
124 */
125 String getUnformattedText();
126 }