{"record":{"id":"f7950cb4ca35c219","repo":"pentaho/pentaho-kettle","slug":"transgraph-dialog-invalidzoommeasurement-message","errorCode":"TransGraph.Dialog.InvalidZoomMeasurement.Message","errorMessage":"TransGraph.Dialog.InvalidZoomMeasurement.Message","messagePattern":"TransGraph\\.Dialog\\.InvalidZoomMeasurement\\.Message","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"ui/src/main/java/org/pentaho/di/ui/spoon/job/JobGraph.java","lineNumber":1482,"sourceCode":"    }\n  }\n\n  /**\n   * Allows for magnifying to any percentage entered by the user...\n   */\n  private void readMagnification() {\n    float previousMagnification = magnification;\n    String possibleText = zoomLabel.getText();\n    possibleText = possibleText.replace( \"%\", \"\" );\n\n    float possibleFloatMagnification;\n    try {\n      possibleFloatMagnification = Float.parseFloat( possibleText ) / 100;\n      magnification = possibleFloatMagnification;\n      if ( magnification < MIN_ZOOM || magnification > MAX_ZOOM ) {\n        magnification = previousMagnification;\n        log.logError( \"Invalid zoom value: \" + zoomLabel.getText() );\n        throw new IllegalArgumentException( );\n      }\n      if ( zoomLabel.getText().indexOf( '%' ) < 0 ) {\n        zoomLabel.setText( zoomLabel.getText().concat( \"%\" ) );\n      }\n    } catch ( Exception e ) {\n      MessageBox mb = new MessageBox( shell, SWT.YES | SWT.ICON_ERROR );\n      mb.setMessage( BaseMessages.getString( PKG, \"TransGraph.Dialog.InvalidZoomMeasurement.Message\", String.valueOf( (int) ( MIN_ZOOM * 100 ) ), String.valueOf( (int) MAX_ZOOM * 100 ) ) );\n      mb.setText( BaseMessages.getString( PKG, \"TransGraph.Dialog.InvalidZoomMeasurement.Title\" ) );\n      mb.open();\n    }\n    redraw();\n  }\n\n  public void keyPressed( KeyEvent e ) {\n\n    // Delete\n    if ( e.keyCode == SWT.DEL ) {\n      List<JobEntryCopy> copies = jobMeta.getSelectedEntries();","sourceCodeStart":1464,"sourceCodeEnd":1500,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/spoon/job/JobGraph.java#L1464-L1500","documentation":"JobGraph's zoom handling parses the text typed into the zoom label as a percentage. If parsing fails or the resulting magnification falls outside MIN_ZOOM..MAX_ZOOM, the previous magnification is restored, an error is logged, and an IllegalArgumentException is thrown internally to route control to the catch block that shows the 'Invalid zoom measurement' message box.","triggerScenarios":"Typing a non-numeric zoom value (e.g. 'abc') or a percentage out of range (below MIN_ZOOM or above MAX_ZOOM, e.g. '5000%') into the JobGraph zoom label and pressing Enter.","commonSituations":"User typo such as '1oo%' or '12.3.4'; pasting a magnification value without the percent sign outside supported range; locale-confusing decimal separators like '1,5' being parsed as invalid.","solutions":["Enter a numeric zoom percentage within the allowed MIN_ZOOM–MAX_ZOOM range (e.g. '100%').","Avoid non-numeric characters and stray decimal separators in the zoom field.","Use the zoom drop-down presets instead of free-typing values."],"exampleFix":"// before\nzoomLabel.setText( \"5000\" ); // out of range\n// after\nzoomLabel.setText( \"100%\" ); // within MIN_ZOOM..MAX_ZOOM","handlingStrategy":"validation","validationCode":"float m;\ntry { m = Float.parseFloat( text ) / 100; } catch ( NumberFormatException e ) { m = -1; }\nboolean valid = m >= MIN_ZOOM && m <= MAX_ZOOM;\nif ( !valid ) { /* revert to previousMagnification */ }","typeGuard":null,"tryCatchPattern":"try {\n  applyZoom( possibleText );\n} catch ( Exception e ) {\n  magnification = previousMagnification; // restore safe value\n  // show invalid-zoom message box\n}","preventionTips":["Only type plain numeric percentages into the zoom label.","Stay within the supported MIN_ZOOM..MAX_ZOOM range.","Prefer zoom preset buttons/drop-down over free text entry."],"tags":["ui","zoom","job-graph","invalid-input"],"backgroundTag":"invalid-argument-value","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}