Changeset 1865 in josm for trunk/src/org/openstreetmap/josm/gui/progress
- Timestamp:
- 2009-07-28T19:48:39+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r1863 r1865 16 16 17 17 import org.openstreetmap.josm.Main; 18 import org.openstreetmap.josm.gui.OptionPaneUtil; 18 19 import org.openstreetmap.josm.gui.PleaseWaitDialog; 20 import static org.openstreetmap.josm.tools.I18n.tr; 19 21 20 22 … … 73 75 } 74 76 77 @Override 75 78 public void doBeginTask() { 76 79 doInEDT(new Runnable() { … … 80 83 } else if (dialogParent instanceof Dialog) { 81 84 dialog = new PleaseWaitDialog((Dialog)dialogParent); 82 } else {85 } else 83 86 throw new ProgressException("PleaseWaitDialog parent must be either Frame or Dialog"); 84 }85 87 86 88 dialog.cancel.setEnabled(true); … … 94 96 } 95 97 98 @Override 96 99 public void doFinishTask() { 97 100 doInEDT(new Runnable() { … … 103 106 dialog.cancel.removeActionListener(cancelListener); 104 107 if (getErrorMessage() != null) { 105 JOptionPane.showMessageDialog(Main.parent, getErrorMessage()); 108 OptionPaneUtil.showMessageDialog( 109 Main.parent, getErrorMessage(), 110 tr("Error"), 111 JOptionPane.ERROR_MESSAGE); 106 112 } 107 113 dialog = null; … … 111 117 } 112 118 119 @Override 113 120 protected void updateProgress(double progressValue) { 114 121 final int newValue = (int)(progressValue * PROGRESS_BAR_MAX);
Note:
See TracChangeset
for help on using the changeset viewer.