01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wikitext.widgets;
04:
05: public class ListItemWidget extends ParentWidget {
06: private int level;
07:
08: public ListItemWidget(ParentWidget parent, String text, int level)
09: throws Exception {
10: super (parent);
11: this .level = level;
12: addChildWidgets(text);
13: }
14:
15: public String render() throws Exception {
16: StringBuffer html = new StringBuffer();
17: for (int i = 0; i < level; i++)
18: html.append("\t");
19: html.append("<li>").append(childHtml()).append("</li>\n");
20:
21: return html.toString();
22: }
23: }
|