(TextEvent e)
| 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) { |
nothing calls this directly
no test coverage detected