org.scalafx.extras.image

Members list

Type members

Classlikes

class ImageDisplay

Displays an image view with the ability to zoom in, zoom out, zoom to fit. It can be also automatically resized to the parent's size. When zoomToFit is set to true, the image is sized to fit the parent scroll pane.

Displays an image view with the ability to zoom in, zoom out, zoom to fit. It can be also automatically resized to the parent's size. When zoomToFit is set to true, the image is sized to fit the parent scroll pane.

Sample usage (full detains in ImageDisplayDemoApp)

object ImageDisplayDemoApp extends JFXApp3 {

 override def start(): Unit = {

   private val imageDisplay = new ImageDisplay()

   stage = new PrimaryStage {
     scene = new Scene(640, 480) {
       title = "ImageDisplay Demo"
       root = new BorderPane {
         top = new ToolBar {
           items = Seq(
             new Button("Open...") {
               onAction = () => onFileOpen()
             },
             new Button("Zoom In") {
               onAction = () => imageDisplay.zoomIn()
               disable <== imageDisplay.zoomToFit
             },
             new Button("Zoom Out") {
               onAction = () => imageDisplay.zoomOut()
               disable <== imageDisplay.zoomToFit
             },
             new ToggleButton("Zoom to fit") {
               selected <==> imageDisplay.zoomToFit
             }
           )
         }
         center = imageDisplay.view
       }
     }
   }
 }
}

Attributes

Supertypes
class Object
trait Matchable
class Any
enum ZoomScale(val scale: Double, val name: String)

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ZoomScale

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ZoomScale.type