- Timestamp:
- 2015-08-25T02:32:50+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r8510 r8692 3 3 4 4 import java.awt.Component; 5 import java.awt.GraphicsEnvironment; 5 6 import java.awt.event.ActionEvent; 6 7 import java.awt.event.ActionListener; … … 98 99 } 99 100 101 /** 102 * Constructs a new {@code PleaseWaitProgressMonitor}. 103 */ 100 104 public PleaseWaitProgressMonitor() { 101 105 this(""); 102 106 } 103 107 108 /** 109 * Constructs a new {@code PleaseWaitProgressMonitor}. 110 */ 104 111 public PleaseWaitProgressMonitor(String windowTitle) { 105 112 this(Main.parent); … … 107 114 } 108 115 116 /** 117 * Constructs a new {@code PleaseWaitProgressMonitor}. 118 */ 109 119 public PleaseWaitProgressMonitor(Component dialogParent) { 110 120 super(new CancelHandler()); 111 this.dialogParent = JOptionPane.getFrameForComponent(dialogParent); 121 if (GraphicsEnvironment.isHeadless()) { 122 this.dialogParent = dialogParent; 123 } else { 124 this.dialogParent = JOptionPane.getFrameForComponent(dialogParent); 125 } 112 126 this.cancelable = true; 113 127 } 114 128 129 /** 130 * Constructs a new {@code PleaseWaitProgressMonitor}. 131 */ 115 132 public PleaseWaitProgressMonitor(Component dialogParent, String windowTitle) { 116 133 this(JOptionPane.getFrameForComponent(dialogParent));
Note:
See TracChangeset
for help on using the changeset viewer.