Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: jac/aspects/gui/web/StatusBar.java


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 jac.aspects.gui.web;
19  
20  import jac.aspects.gui.*;
21  import jac.core.rtti.MethodItem;
22  import jac.util.Log;
23  import java.io.PrintWriter;
24  import java.util.HashMap;
25  import java.util.Iterator;
26  import java.util.Vector;
27  
28  public class StatusBar extends AbstractView implements StatusView, HTMLViewer {
29  
30     MethodItem method = null;
31  
32     public StatusBar(ViewFactory factory, DisplayContext context,MethodItem method) {
33        super(factory,context);
34        this.method = method;
35     }
36  
37     // StatusView interface
38  
39     String position;
40     
41     /**
42      * Get the value of position.
43      * @return value of position.
44      */
45     public String getPosition() {
46        return position;
47     }
48     
49     /**
50      * Set the value of position.
51      * @param v  Value to assign to position.
52      */
53     public void setPosition(String  v) {
54        this.position = v;
55     }
56  
57     public void showMessage(String message) {
58     }
59  
60     // HTMLViewer interface
61  
62     public void genHTML(PrintWriter out) {
63        if (method!=null) {
64           out.println("<div class=\"statusBar\">");
65           out.println(method.invoke(null,new Object[0]));
66           out.println("</div>");
67        }
68     }
69  
70  }
71