KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > web > StatusBar


1 /*
2   Copyright (C) 2002-2003 Renaud Pawlak <renaud@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.gui.web;
19
20 import java.io.PrintWriter JavaDoc;
21 import org.objectweb.jac.aspects.gui.*;
22 import org.objectweb.jac.core.rtti.MethodItem;
23 import org.objectweb.jac.util.ExtArrays;
24
25 public class StatusBar extends AbstractView implements StatusView, HTMLViewer {
26
27     MethodItem method = null;
28
29     public StatusBar(ViewFactory factory, DisplayContext context,MethodItem method) {
30         super(factory,context);
31         this.method = method;
32     }
33
34     // StatusView interface
35

36     String JavaDoc position;
37    
38     /**
39      * Get the value of position.
40      * @return value of position.
41      */

42     public String JavaDoc getPosition() {
43         return position;
44     }
45    
46     /**
47      * Set the value of position.
48      * @param v Value to assign to position.
49      */

50     public void setPosition(String JavaDoc v) {
51         this.position = v;
52     }
53
54     public void showMessage(String JavaDoc message) {
55     }
56
57     // HTMLViewer interface
58

59     public void genHTML(PrintWriter JavaDoc out) {
60         if (method!=null) {
61             out.println("<div class=\"statusBar\">");
62             out.println(method.invoke(null,ExtArrays.emptyObjectArray));
63             out.println("</div>");
64         }
65     }
66
67 }
68
Popular Tags