[Jarspy-commits] CVS: JarSpy/src/com/ociweb/jarspy/gui StatusBar.java,NONE,1.1
Status: Beta
Brought to you by:
brown_j
|
From: Jeff B. <br...@us...> - 2002-09-14 00:44:44
|
Update of /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/gui
In directory usw-pr-cvs1:/tmp/cvs-serv1408
Added Files:
StatusBar.java
Log Message:
--- NEW FILE: StatusBar.java ---
// JarSpy
// Copyright (c) 2001, 2002 Jeff S. Brown
// This file is part of JarSpy.
//
// JarSpy is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// JarSpy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with JarSpy; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.ociweb.jarspy.gui;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.BorderFactory;
import javax.swing.border.BevelBorder;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import com.ociweb.jarspy.ClassInfo;
import com.ociweb.gui.MemoryMeter;
/**
* @version $Id: StatusBar.java,v 1.1 2002/09/14 00:44:41 brown_j Exp $
*/
public class StatusBar extends JPanel implements ClassSelectionListener {
private JLabel statusLabel = new JLabel("JarSpy");
StatusBar() {
setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = gbc.RELATIVE;
gbc.gridy = 0;
gbc.fill = gbc.HORIZONTAL;
gbc.insets.left = gbc.insets.right = 10;
gbc.weightx = 1.0;
add(statusLabel, gbc);
gbc.weightx = 0;
gbc.insets.left = gbc.insets.right = 2;
add(new JLabel("Mem:"), gbc);
add(new MemoryMeter(), gbc);
}
public void classSelected(ClassInfo classInfo) {
statusLabel.setText(classInfo != null ?
classInfo.getClassName() :
"JarSpy");
}
}
|