11/*
2- * Copyright (c) 2011-2021 , ScalaFX Project
2+ * Copyright (c) 2011-2024 , ScalaFX Project
33 * All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,7 @@ import scalafx.scene.shape.Rectangle
7878 * }
7979 * }}}
8080 */
81- class ImageDisplay () {
81+ class ImageDisplay {
8282
8383 private val imageView = new ImageView {
8484 preserveRatio = true
@@ -95,12 +95,12 @@ class ImageDisplay() {
9595
9696 private val scrollPane : ScrollPane = new ScrollPane {
9797 self =>
98- // setting `fitTo* = true` makes the image centered when view point is larger than the zoomed image.
98+ // setting `fitTo* = true` makes the image centered when the view point is larger than the zoomed image.
9999 fitToHeight = true
100100 fitToWidth = true
101101 // Wrap content in a group, as advised in ScrollPane documentation,
102- // to get proper size for fitting with using `zoomToFit`.
103- // This may not be needed , as wrapping in a group makes it difficult to center.
102+ // to get the proper size for fitting with using `zoomToFit`.
103+ // This may not be necessary , as wrapping in a group makes it difficult to center.
104104 // content = new Group {
105105 // children = new StackPane {
106106 // children = Seq(imageView, overlayPane)
@@ -112,13 +112,15 @@ class ImageDisplay() {
112112 }
113113
114114 /**
115- * Controls image zoom when `zoomToFit` is off. Value of 1 mean no scaling.
116- * Values larger than 1 make image larger. Values smaller than 1 make image smaller.
115+ * Controls image zoom when `zoomToFit` is off.
116+ * The value of 1 means no scaling.
117+ * Values larger than 1 make image larger.
118+ * Values smaller than 1 make image smaller.
117119 */
118120 val zoom : ObjectProperty [ZoomScale ] = ObjectProperty [ZoomScale ](this , " Zoom" , ZoomScale .Zoom100Perc )
119121
120122 /**
121- * When set to `true` the image fits to the size of the available view, maintaining its aspect ratio.
123+ * When set to `true`, the image fits to the size of the available view, maintaining its aspect ratio.
122124 */
123125 val zoomToFit : BooleanProperty = BooleanProperty (value = false )
124126
@@ -147,7 +149,7 @@ class ImageDisplay() {
147149 val flipY : BooleanProperty = BooleanProperty (value = false )
148150
149151 /**
150- * Property containing image to be displayed. If `null` the display will be blank (following JavaFX convention)
152+ * Property containing image to be displayed. If `null`, the display will be blank (following JavaFX convention)
151153 */
152154 val image : ObjectProperty [javafx.scene.image.Image ] = imageView.image
153155
0 commit comments