Revision 4855
trunk/libraries/libIverUtiles/src/com/iver/utiles/swing/threads/UndefinedProgressMonitor.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.2 2006-03-20 16:04:21 azabala |
|
48 |
* Revision 1.3 2006-04-18 15:16:14 azabala |
|
49 |
* a?adida la posibilidad de personalizar el titulo del dialogo de proceso |
|
50 |
* |
|
51 |
* Revision 1.2 2006/03/20 16:04:21 azabala |
|
49 | 52 |
* *** empty log message *** |
50 | 53 |
* |
51 | 54 |
* Revision 1.1 2006/03/14 19:23:58 azabala |
... | ... | |
65 | 68 |
import java.awt.GridBagLayout; |
66 | 69 |
import java.awt.GridBagConstraints; |
67 | 70 |
|
68 |
|
|
71 |
/** |
|
72 |
* Dialog that shows the evolution of the execution of a |
|
73 |
* ITask. |
|
74 |
* If this ITask is a defined task (we know the number of steps |
|
75 |
* it must do) it shows a progress bar. |
|
76 |
* |
|
77 |
* If it doesnt, progress bar is filling and emptying |
|
78 |
* @author azabala |
|
79 |
* |
|
80 |
*/ |
|
69 | 81 |
public class UndefinedProgressMonitor extends JDialog |
70 | 82 |
implements IProgressMonitorIF{ |
71 | 83 |
|
... | ... | |
77 | 89 |
private JProgressBar jProgressBar = null; |
78 | 90 |
private JButton cancelButton = null; |
79 | 91 |
boolean canceled = false; |
92 |
private String title = "Processing..."; |
|
80 | 93 |
|
81 | 94 |
/** |
82 | 95 |
* This is the default constructor |
... | ... | |
85 | 98 |
super(); |
86 | 99 |
initialize(); |
87 | 100 |
} |
88 |
|
|
89 |
public UndefinedProgressMonitor(Frame parent){ |
|
90 |
//quiz?s lo de run in background ponga el dialogo a |
|
91 |
//no modal -> modal |
|
101 |
/** |
|
102 |
* Constructor which specify the dialog title |
|
103 |
* (for example:processing, etc) |
|
104 |
* @param parent |
|
105 |
* @param title |
|
106 |
*/ |
|
107 |
public UndefinedProgressMonitor(Frame parent, String title){ |
|
92 | 108 |
super(parent, false); |
109 |
this.title = title; |
|
93 | 110 |
initialize(); |
94 | 111 |
} |
95 | 112 |
|
... | ... | |
102 | 119 |
*/ |
103 | 120 |
private void initialize() { |
104 | 121 |
this.setSize(318, 181); |
105 |
this.setTitle("Processing...");
|
|
122 |
this.setTitle(title);
|
|
106 | 123 |
this.setContentPane(getJContentPane()); |
107 | 124 |
} |
108 | 125 |
|
Also available in: Unified diff