()
| 150 | // Either one is wrong or we're papering over something [fry 150811] |
| 151 | EventQueue.invokeLater(new Runnable() { |
| 152 | @Override |
| 153 | public void run() { |
| 154 | // Space for the editor plus a li'l gap |
| 155 | int roughWidth = getWidth() + 20; |
| 156 | Point p = null; |
| 157 | // If no window open, or the editor is at the edge of the screen |
| 158 | Editor editor = base.getActiveEditor(); |
| 159 | if (editor == null || |
| 160 | (p = editor.getLocation()).x < roughWidth) { |
| 161 | // Center the window on the screen |
| 162 | setLocationRelativeTo(null); |
| 163 | } else { |
| 164 | // Open the window relative to the editor |
| 165 | setLocation(p.x - roughWidth, p.y); |
| 166 | } |
| 167 | setVisible(true); |
| 168 | } |
| 169 | }); |
| 170 | } |
| 171 | } |
nothing calls this directly
no test coverage detected