(ComponentEvent e)
| 118 | |
| 119 | canvas.addComponentListener(new ComponentAdapter() { |
| 120 | @Override |
| 121 | public void componentResized(ComponentEvent e) { |
| 122 | if (!sketch.isLooping()) { |
| 123 | // make sure this is a real resize event, not just initial setup |
| 124 | // https://github.com/processing/processing/issues/3310 |
| 125 | Dimension canvasSize = canvas.getSize(); |
| 126 | if (canvasSize.width != sketch.sketchWidth() || |
| 127 | canvasSize.height != sketch.sketchHeight()) { |
| 128 | sketch.redraw(); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | }); |
| 133 | addListeners(); |
| 134 | } |
nothing calls this directly
no test coverage detected