001 /* 002 Copyright (C) 2002 Renaud Pawlak <renaud@aopsys.com> 003 004 This program is free software; you can redistribute it and/or modify 005 it under the terms of the GNU Lesser General Public License as 006 published by the Free Software Foundation; either version 2 of the 007 License, or (at your option) any later version. 008 009 This program is distributed in the hope that it will be useful, 010 but WITHOUT ANY WARRANTY; without even the implied warranty of 011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 GNU Lesser General Public License for more details. 013 014 You should have received a copy of the GNU Lesser General Public License 015 along with this program; if not, write to the Free Software 016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 017 018 package org.objectweb.jac.aspects.gui.swing; 019 020 import javax.swing.JLabel; 021 import org.objectweb.jac.aspects.gui.*; 022 import org.objectweb.jac.core.rtti.MethodItem; 023 024 public class StatusBar extends AbstractView implements StatusView { 025 026 MethodItem method; 027 JLabel msgLabel; 028 029 public StatusBar(MethodItem method) { 030 this.method=method; 031 msgLabel=new JLabel(); 032 add(msgLabel); 033 msgLabel.setText("Welcome"); 034 } 035 036 // StatusView interface 037 038 String position; 039 040 /** 041 * Get the value of position. 042 * @return value of position. 043 */ 044 public String getPosition() { 045 return position; 046 } 047 048 /** 049 * Set the value of position. 050 * @param v Value to assign to position. 051 */ 052 public void setPosition(String v) { 053 this.position = v; 054 } 055 056 public void showMessage(String message) { 057 msgLabel.setText(message); 058 } 059 060 061 }