1 /***
2 *
3 */
4 package net.trajano.twiff.renderer;
5
6 /***
7 * A page data that contains a string.
8 *
9 * @author Archimedes Trajano
10 */
11 public class StringElement implements PageElement {
12 /***
13 * Accepts a visitor that should visit the page data.
14 *
15 * @param visitor
16 * visitor.
17 */
18 public void accept(final PageElementVisitor visitor) {
19 visitor.visitStringPageElement(this, content);
20 }
21
22 /***
23 * Returns the content of the string page data.
24 *
25 * @return content.
26 */
27 public String getContent() {
28 return content;
29 }
30
31 /***
32 * Constructs the element.
33 *
34 * @param content
35 * content
36 */
37 public StringElement(final String content) {
38 this.content = content;
39 }
40
41 /***
42 * Content of the page data.
43 */
44 private final String content;
45
46 /***
47 * @see net.trajano.twiff.renderer.PageElement#getColumnNumber()
48 */
49 public int getColumnNumber() {
50
51 return 0;
52 }
53
54 /***
55 * @see net.trajano.twiff.renderer.PageElement#getLineNumber()
56 */
57 public int getLineNumber() {
58
59 return 0;
60 }
61 }