Revision 22756 branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/ProgressDialog.java

View differences:

ProgressDialog.java
79 79
import javax.swing.JLabel;
80 80
import javax.swing.JProgressBar;
81 81

  
82
//import com.iver.andami.messages.NotificationManager;
83
//import com.iver.andami.ui.mdiManager.SingletonWindow;
84
/** * 
82
/** 
83
 * It is aimed to have an easy way to show a progres bar dialog. 
84
 * Unfortunatelly, it is not finished. Next step would be to
85
 * let ProgressDialog implement ProgressListener, to completely
86
 * encapsulate the component. Until then, the user has to call
87
 * setProgress(int) to make the bar grow up.
85 88
 * 
86
 * Debe de ser independiente de andami.
87
 * Cuando se cumpla esta condicion quitaremos
88
 * el deprecated
89
 * 
90
 * 
91
 * @author jaume
89
 * @author jaume dominguez faus - jaume.dominguez@iver.es
92 90
 *
93
 * @deprecated  Falta terminar
94 91
 */
95 92
public class ProgressDialog extends JDialog {  
96 93
  private static final long serialVersionUID = 2325230864829072756L;
......
100 97
	private JLabel lblTask = null;
101 98
	private String jobName;
102 99
	private CancellableComponent cc;
100
	private String textMessage;
103 101

  
104
	/**
105
	 * This is the default constructor
106
	 */
107 102
	public ProgressDialog(CancellableComponent owner, String jobName, int stepAmount) {
103
		this(owner, jobName, jobName, stepAmount);
104
	}
105
	
106
	public ProgressDialog(CancellableComponent owner, String jobName, String textMessage, int stepAmount) {
108 107
		super();
109
		
110
		Exception e = new Exception();
111
		System.out.println("***** No deberia de usarse la clase " + ProgressDialog.class.getName());
112
		e.printStackTrace();
113
		
114
		
115
		this.jobName = jobName;
108
		setTitle(jobName);
109
		this.textMessage = textMessage;
116 110
		getJProgressBar().setMinimum(0);
117 111
		getJProgressBar().setMaximum(stepAmount);
118 112
		cc = owner;
......
128 122
		lblTask = new JLabel();
129 123
		lblTask.setBounds(10, 12, 280, 20);
130 124
		lblTask.setFont(new java.awt.Font("MS Sans Serif", java.awt.Font.BOLD, 11));
131
		lblTask.setText(jobName);
125
		lblTask.setText(textMessage);
132 126
		lblStatus = new JLabel();
133 127
		lblStatus.setBounds(10, 63, 280, 20);
134 128
		this.getContentPane().setLayout(null);

Also available in: Unified diff