01: package pygmy.nntp.http;
02:
03: import pygmy.nntp.NewsGroup;
04: import pygmy.core.HttpRequest;
05:
06: import java.io.IOException;
07:
08: public class MessageControls extends ViewDecorator {
09:
10: ForumMessage message;
11: NewsGroup topic;
12:
13: public MessageControls(String urlPrefix, View component,
14: ForumMessage message, NewsGroup topic) {
15: super (urlPrefix, component);
16: this .message = message;
17: this .topic = topic;
18: }
19:
20: private void addMessageControls() {
21: createLink("Post a Reply", getForumUrl(message.getReplyUrl()),
22: "replylink");
23: buffer.append("<br>");
24: }
25:
26: // private void addNavigationControls() {
27: // buffer.append("<table>\n");
28: // addTableRow("fileentry");
29: // addTableColumn("[Previous Thread]", );
30: // tableRowEnd();
31: // buffer.append("</table><br>\n");
32: // }
33:
34: public String render(HttpRequest request) throws IOException {
35: // addNavigationControls();
36: buffer.append(super.render(request));
37: addMessageControls();
38: return buffer.toString();
39: }
40: }
|