View Javadoc

1   /*
2    * This file is part of NetPisteur.
3    * 
4    * Copyright 2001-2002 : Olivier CORNEC, David BOUANCHEAU, Loic LOPEZ,
5    *                       Gaetan BOUDARD, Mael LE LANNOU, Julien ROBINEAU
6    * 
7    * Copyright 2002-2003 : Olivier BRIENS, Simon DEZE, Florence FRIGOULT,
8    *                       Olivier JOURNEAULT, Francois MARTINIER, Damien RAUDE-MORVAN
9    * 
10   * Copyright 2004-2007 : Damien RAUDE-MORVAN
11   * 
12   * NetPisteur is free software; you can redistribute it and/or modify
13   * it under the terms of the GNU General Public License as published by
14   * the Free Software Foundation; either version 2 of the License, or
15   * (at your option) any later version.
16   *
17   * NetPisteur is distributed in the hope that it will be useful,
18   * but WITHOUT ANY WARRANTY; without even the implied warranty of
19   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20   * GNU General Public License for more details.
21   *
22   * You should have received a copy of the GNU General Public License
23   * along with NetPisteur; if not, write to the Free Software
24   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
25   *
26   */
27  package com.drazzib.netpisteur.ui;
28  
29  import javax.swing.JProgressBar;
30  
31  import org.apache.commons.logging.Log;
32  import org.apache.commons.logging.LogFactory;
33  
34  public class LoadBar extends JProgressBar {
35  
36  	/**
37  	 * 
38  	 */
39  	private static final long serialVersionUID = -4573687824280512648L;
40  	
41  	private static Log log = LogFactory.getLog(LoadBar.class);
42  
43  	public LoadBar() {
44  		super();
45  		log.trace("SHOW ProgressBar");
46  		loadBar();
47  	}
48  
49  	public void loadBar() {
50  		this.setIndeterminate(true);
51  		this.setVisible(true);
52  		log.trace("LOAD ProgressBar");
53  	}
54  
55  	public void unloadBar() {
56  		this.setIndeterminate(false);
57  		this.setVisible(false);
58  		log.trace("UNLOAD ProgressBar");
59  	}
60  
61  }