MCPcopy Index your code
hub / github.com/benfry/processing4 / componentResized

Method componentResized

core/src/processing/awt/PSurfaceAWT.java:120–131  ·  view source on GitHub ↗
(ComponentEvent e)

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 13

setSizeMethod · 0.95
setLocationMethod · 0.95
isLoopingMethod · 0.80
getSizeMethod · 0.80
sketchWidthMethod · 0.80
sketchHeightMethod · 0.80
redrawMethod · 0.80
getComponentMethod · 0.80
getXMethod · 0.80
getYMethod · 0.80
postWindowResizedMethod · 0.80
postWindowMovedMethod · 0.80

Tested by

no test coverage detected