### Eclipse Workspace Patch 1.0
#P JOSM
|
|
|
|
| 7 | 7 | import java.awt.BorderLayout; |
| 8 | 8 | import java.awt.Component; |
| 9 | 9 | import java.awt.Dialog.ModalityType; |
| | 10 | import java.awt.Dimension; |
| 10 | 11 | import java.awt.Font; |
| 11 | 12 | import java.awt.GridBagLayout; |
| 12 | 13 | import java.awt.Point; |
| … |
… |
|
| 265 | 266 | }; |
| 266 | 267 | final JDialog dlg = optionPane.createDialog(Main.parent, tr("Change values?")); |
| 267 | 268 | dlg.setModalityType(ModalityType.DOCUMENT_MODAL); |
| 268 | | |
| | 269 | Dimension dlgSize = dlg.getSize(); |
| | 270 | if(dlgSize.width > Main.parent.getSize().width) { |
| | 271 | dlgSize.width = Math.max(250, Main.parent.getSize().width); |
| | 272 | dlg.setSize(dlgSize); |
| | 273 | } |
| | 274 | dlg.setLocationRelativeTo(Main.parent); |
| 269 | 275 | values.getEditor().addActionListener(new ActionListener() { |
| 270 | 276 | public void actionPerformed(ActionEvent e) { |
| 271 | 277 | dlg.setVisible(false); |