MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / textValueChanged

Method textValueChanged

ij/src/main/java/ij/plugin/Resizer.java:375–393  ·  view source on GitHub ↗
(TextEvent e)

Source from the content-addressed store, hash-verified

373 }
374
375 public void textValueChanged(TextEvent e) {
376 TextField widthField = (TextField)fields.elementAt(0);
377 TextField heightField = (TextField)fields.elementAt(1);
378 int width = (int)Tools.parseDouble(widthField.getText(),-99);
379 int height = (int)Tools.parseDouble(heightField.getText(),-99);
380 if (width==-99 || height==-99)
381 return;
382 if (constrain) {
383 if (width!=newWidth) {
384 sizeToHeight = false;
385 newWidth = width;
386 updateFields();
387 } else if (height!=newHeight) {
388 sizeToHeight = true;
389 newHeight = height;
390 updateFields();
391 }
392 }
393 }
394
395 void updateFields() {
396 if (sizeToHeight) {

Callers

nothing calls this directly

Calls 3

parseDoubleMethod · 0.95
updateFieldsMethod · 0.95
getTextMethod · 0.45

Tested by

no test coverage detected