package image
- Alphabetic
- Public
- Protected
Type Members
- class ImageDisplay extends AnyRef
Displays an image view with ability to zoom in, zoom out, zoom to fit.
Displays an image view with ability to zoom in, zoom out, zoom to fit. It can also automatically resizes to parent size. When
zoomToFit
is set totrue
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 } } } } }
- sealed abstract class ZoomScale extends EnumEntry
Helper methods and classes to simplify ScalaFX use.
Package
org.scalafx.extras
contains basic helper methods for running tasks on threads and showing messages.Package
org.scalafx.extras.image
contains image display component with scrolling and zooming.Package
org.scalafx.extras.mvcfx
contains classes for creating with UI components based on FXML.