@@ -461,7 +461,7 @@ else if (level_spec.equalsIgnoreCase(Messages.Zoom_Height))
461461 */
462462 private double setZoom (final double zoom )
463463 {
464- final double zoom_to_set ;
464+ final double zoomToSet ;
465465 if (zoom <= 0.0 )
466466 { // Determine zoom to fit outline of display into available space.
467467 // In order to determine the actual bounds within which an OPI
@@ -475,8 +475,8 @@ private double setZoom(final double zoom)
475475 double hHcrollbarHeight = 0.0 ;
476476 {
477477 List <ScrollBar > scrollbars = model_root .lookupAll (".scroll-bar" ).stream ().filter (node -> node instanceof ScrollBar ).map (node -> (ScrollBar ) node ).collect (Collectors .toUnmodifiableList ());
478- List <ScrollBar > model_root_scrollbars = scrollbars .stream ().filter (scrollbar -> scrollbar .getParent () == model_root ).collect (Collectors .toUnmodifiableList ());
479- for (ScrollBar scrollBar : model_root_scrollbars ) {
478+ List <ScrollBar > modelRootScrollbars = scrollbars .stream ().filter (scrollbar -> scrollbar .getParent () == model_root ).collect (Collectors .toUnmodifiableList ());
479+ for (ScrollBar scrollBar : modelRootScrollbars ) {
480480 if (scrollBar .getOrientation () == Orientation .HORIZONTAL ) {
481481 hScrollbarVisible = scrollBar .isVisible ();
482482 hHcrollbarHeight = scrollBar .getLayoutBounds ().getHeight ();
@@ -498,10 +498,10 @@ else if (scrollBar.isVisible() && scrollBar.getOrientation() == Orientation.VERT
498498 Math .max (0.0 , viewportBounds .getWidth () - (vScrollbarVisible ? 0.0 : vScrollbarWidth )),
499499 Math .max (0.0 , viewportBounds .getHeight () - (hScrollbarVisible ? 0.0 : hHcrollbarHeight )));
500500
501- final double zoom_x_with_scrollbars_rounded ;
502- final double zoom_x_without_scrollbars_rounded ;
503- final double zoom_y_with_scrollbars_rounded ;
504- final double zoom_y_without_scrollbars_rounded ;
501+ final double zoomXWithScrollbarsRounded ;
502+ final double zoomXWithoutScrollbarsRounded ;
503+ final double zoomYWithScrollbarsRounded ;
504+ final double zoomYWithoutScrollbarsRounded ;
505505
506506 {
507507 final Bounds outline = widget_pane .getLayoutBounds ();
@@ -514,84 +514,84 @@ else if (scrollBar.isVisible() && scrollBar.getOrientation() == Orientation.VERT
514514 // to zoom 'in'.
515515 // This requires displays to be created with
516516 // correct width/height properties.
517- final double zoom_x_without_scrollbars , zoom_y_without_scrollbars ;
518- final double zoom_x_with_scrollbars , zoom_y_with_scrollbars ;
517+ final double zoomXWithoutScrollbars , zoomYWithoutScrollbars ;
518+ final double zoomXWithScrollbars , zoomYWithScrollbars ;
519519 if (outline .getWidth () > layoutBoundsWithScrollbars .getWidth ()) {
520- zoom_x_without_scrollbars = layoutBoundsWithoutScrollbars .getWidth () / outline .getWidth ();
521- zoom_x_with_scrollbars = layoutBoundsWithScrollbars .getWidth () / outline .getWidth ();
520+ zoomXWithoutScrollbars = layoutBoundsWithoutScrollbars .getWidth () / outline .getWidth ();
521+ zoomXWithScrollbars = layoutBoundsWithScrollbars .getWidth () / outline .getWidth ();
522522 }
523523 else if (model .propWidth ().getValue () > 0 ) {
524- zoom_x_without_scrollbars = layoutBoundsWithoutScrollbars .getWidth () / model .propWidth ().getValue ();
525- zoom_x_with_scrollbars = layoutBoundsWithScrollbars .getWidth () / model .propWidth ().getValue ();
524+ zoomXWithoutScrollbars = layoutBoundsWithoutScrollbars .getWidth () / model .propWidth ().getValue ();
525+ zoomXWithScrollbars = layoutBoundsWithScrollbars .getWidth () / model .propWidth ().getValue ();
526526 }
527527 else {
528- zoom_x_without_scrollbars = 1.0 ;
529- zoom_x_with_scrollbars = 1.0 ;
528+ zoomXWithoutScrollbars = 1.0 ;
529+ zoomXWithScrollbars = 1.0 ;
530530 }
531531
532532 if (outline .getHeight () > layoutBoundsWithScrollbars .getHeight ()) {
533- zoom_y_without_scrollbars = layoutBoundsWithoutScrollbars .getHeight () / outline .getHeight ();
534- zoom_y_with_scrollbars = layoutBoundsWithScrollbars .getHeight () / outline .getHeight ();
533+ zoomYWithoutScrollbars = layoutBoundsWithoutScrollbars .getHeight () / outline .getHeight ();
534+ zoomYWithScrollbars = layoutBoundsWithScrollbars .getHeight () / outline .getHeight ();
535535 }
536536 else if (model .propHeight ().getValue () > 0 ) {
537- zoom_y_without_scrollbars =layoutBoundsWithoutScrollbars .getHeight () / model .propHeight ().getValue ();
538- zoom_y_with_scrollbars = layoutBoundsWithScrollbars .getHeight () / model .propHeight ().getValue ();
537+ zoomYWithoutScrollbars =layoutBoundsWithoutScrollbars .getHeight () / model .propHeight ().getValue ();
538+ zoomYWithScrollbars = layoutBoundsWithScrollbars .getHeight () / model .propHeight ().getValue ();
539539 }
540540 else {
541- zoom_y_without_scrollbars = 1.0 ;
542- zoom_y_with_scrollbars = 1.0 ;
541+ zoomYWithoutScrollbars = 1.0 ;
542+ zoomYWithScrollbars = 1.0 ;
543543 }
544544
545545 // Round down the zoom-level in order to avoid situations where the
546546 // zoom-level is instead being rounded up, causing a scrollbar to
547547 // be displayed when a scrollbar is not needed.
548- zoom_x_with_scrollbars_rounded = Math .floor (zoom_x_with_scrollbars * 1000.0 ) / 1000.0 ;
549- zoom_x_without_scrollbars_rounded = Math .floor (zoom_x_without_scrollbars * 1000.0 ) / 1000.0 ;
550- zoom_y_with_scrollbars_rounded = Math .floor (zoom_y_with_scrollbars * 1000.0 ) / 1000.0 ;
551- zoom_y_without_scrollbars_rounded = Math .floor (zoom_y_without_scrollbars * 1000.0 ) / 1000.0 ;
548+ zoomXWithScrollbarsRounded = Math .floor (zoomXWithScrollbars * 1000.0 ) / 1000.0 ;
549+ zoomXWithoutScrollbarsRounded = Math .floor (zoomXWithoutScrollbars * 1000.0 ) / 1000.0 ;
550+ zoomYWithScrollbarsRounded = Math .floor (zoomYWithScrollbars * 1000.0 ) / 1000.0 ;
551+ zoomYWithoutScrollbarsRounded = Math .floor (zoomYWithoutScrollbars * 1000.0 ) / 1000.0 ;
552552 }
553553
554554 if (zoom == ZOOM_WIDTH ) {
555- if (zoom_x_without_scrollbars_rounded * model .propHeight ().getValue () > layoutBoundsWithoutScrollbars .getHeight ()) {
556- // Setting zoom_to_set to 'zoom_x_without_scrollbars_rounded '
555+ if (zoomXWithoutScrollbarsRounded * model .propHeight ().getValue () > layoutBoundsWithoutScrollbars .getHeight ()) {
556+ // Setting zoomToSet to 'zoomXWithoutScrollbarsRounded '
557557 // would result in the horizontal scrollbar being shown.
558- // Therefore, set zoom_to_set = zoom_x_with_scrollbars_rounded
559- zoom_to_set = zoom_x_with_scrollbars_rounded ;
558+ // Therefore, set zoomToSet = zoomXWithScrollbarsRounded
559+ zoomToSet = zoomXWithScrollbarsRounded ;
560560 }
561561 else {
562- zoom_to_set = zoom_x_without_scrollbars_rounded ;
562+ zoomToSet = zoomXWithoutScrollbarsRounded ;
563563 }
564564 }
565565 else if (zoom == ZOOM_HEIGHT ) {
566- if (zoom_y_without_scrollbars_rounded * model .propWidth ().getValue () > layoutBoundsWithoutScrollbars .getWidth ()) {
567- // Setting zoom_to_set to 'zoom_y_without_scrollbars_rounded '
566+ if (zoomYWithoutScrollbarsRounded * model .propWidth ().getValue () > layoutBoundsWithoutScrollbars .getWidth ()) {
567+ // Setting zoomToSet to 'zoomYWithoutScrollbarsRounded '
568568 // would result in the vertical scrollbar being shown.
569- // Therefore, set zoom_to_set = zoom_y_with_scrollbars_rounded :
570- zoom_to_set = zoom_y_with_scrollbars_rounded ;
569+ // Therefore, set zoomToSet = zoomYWithScrollbarsRounded :
570+ zoomToSet = zoomYWithScrollbarsRounded ;
571571 }
572572 else {
573- zoom_to_set = zoom_y_without_scrollbars_rounded ;
573+ zoomToSet = zoomYWithoutScrollbarsRounded ;
574574 }
575575 }
576576 else {
577577 // Assume ZOOM_ALL
578- if (zoom_y_without_scrollbars_rounded * model .propWidth ().getValue () > layoutBoundsWithoutScrollbars .getWidth () ||
579- zoom_x_without_scrollbars_rounded * model .propHeight ().getValue () > layoutBoundsWithoutScrollbars .getHeight ()) {
580- // Setting zoom_to_set to 'Math.min(zoom_x_without_scrollbars_rounded, zoom_y_with_scrollbars_rounded )'
578+ if (zoomYWithoutScrollbarsRounded * model .propWidth ().getValue () > layoutBoundsWithoutScrollbars .getWidth () ||
579+ zoomXWithoutScrollbarsRounded * model .propHeight ().getValue () > layoutBoundsWithoutScrollbars .getHeight ()) {
580+ // Setting zoomToSet to 'Math.min(zoomXWithoutScrollbarsRounded, zoomYWithScrollbarsRounded )'
581581 // would result in at least either the vertical or the horizontal scrollbar being shown.
582- // Therefore, set zoom_to_set = Math.min(zoom_x_without_scrollbars_rounded, zoom_y_without_scrollbars_rounded ):
583- zoom_to_set = Math .min (zoom_x_with_scrollbars_rounded , zoom_y_with_scrollbars_rounded ); // Assume ZOOM_ALL
582+ // Therefore, set zoomToSet = Math.min(zoomXWithoutScrollbarsRounded, zoomYWithoutScrollbarsRounded ):
583+ zoomToSet = Math .min (zoomXWithScrollbarsRounded , zoomYWithScrollbarsRounded ); // Assume ZOOM_ALL
584584 }
585585 else {
586- zoom_to_set = Math .min (zoom_x_without_scrollbars_rounded , zoom_y_without_scrollbars_rounded );
586+ zoomToSet = Math .min (zoomXWithoutScrollbarsRounded , zoomYWithoutScrollbarsRounded );
587587 }
588588 }
589589 }
590590 else {
591- zoom_to_set = zoom ;
591+ zoomToSet = zoom ;
592592 }
593593
594- widget_pane .getTransforms ().setAll (new Scale (zoom_to_set , zoom_to_set ));
594+ widget_pane .getTransforms ().setAll (new Scale (zoomToSet , zoomToSet ));
595595 // Appears similar to using this API:
596596 // widget_parent.setScaleX(zoom);
597597 // widget_parent.setScaleY(zoom);
@@ -605,7 +605,7 @@ else if (zoom == ZOOM_HEIGHT) {
605605 if (isEditMode ())
606606 updateModelSizeIndicators ();
607607
608- return zoom_to_set ;
608+ return zoomToSet ;
609609 }
610610
611611 /** @return Zoom factor, 1.0 for 1:1 */
0 commit comments