package input
- Alphabetic
- By Inheritance
- input
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
Clipboard
extends SFXDelegate[javafx.scene.input.Clipboard]
Represents an operating system clipboard, on which data may be placed during, for example, cut, copy, and paste operations.
Represents an operating system clipboard, on which data may be placed during, for example, cut, copy, and paste operations.
To access the general system clipboard, use the following code:
val clipboard = Clipboard.systemClipboard
There is only ever one instance of the system clipboard in the application, so it is perfectly acceptable to stash a reference to it somewhere handy if you so choose.
The Clipboard operates on the concept of having a single conceptual item on the clipboard at any one time -- though it may be placed on the clipboard in different formats.
Example use:
val clipboard = Clipboard.systemClipboard val content = new ClipboardContent() content.putString("Some text") content.putHtml("Some text") clipboard.content = content
Alternative use:
Clipboard.systemClipboard.content = ClipboardContent( DataFormat.PlainText -> "Some text", DataFormat.Html -> "Some text" )
Caution when putting files into the clipboard. The recommended method is:
val content = new ClipboardContent() content.putString("Some text")
Wraps a JavaFX Clipboard.
-
class
ClipboardContent
extends JMapWrapperLike[javafx.scene.input.DataFormat, AnyRef, ClipboardContent] with SFXDelegate[javafx.scene.input.ClipboardContent]
Data container for Clipboard data.
Data container for Clipboard data. It can hold multiple data in several data formats.
Example use:
val content = new ClipboardContent() content.putString("Some text") content.putHtml("Some text")
Alternative use:
val content = ClipboardContent( DataFormat.PlainText -> "Some text", DataFormat.Html -> "Some text" )
Caution when putting files into the clipboard. The recommended way is to use
putFiles
method:content.putFiles(Seq(new File("one"), new File("two"))) *
When using with
DataFormat.Files
you have to use JavaList
as a container, which is less convenient:import scala.collection.JavaConverters._ val content = ClipboardContent( DataFormat.Files -> Seq(new File("one"), new File("two")).asJava, )
Wraps a JavaFX ClipboardContent.
- class ContextMenuEvent extends InputEvent with SFXDelegate[javafx.scene.input.ContextMenuEvent]
-
class
DataFormat
extends SFXDelegate[javafx.scene.input.DataFormat]
Data format identifier used as means of identifying the data stored on a clipboard/dragboard.
Data format identifier used as means of identifying the data stored on a clipboard/dragboard.
Wraps a JavaFX DataFormat.
- class DragEvent extends InputEvent with SFXDelegate[javafx.scene.input.DragEvent]
-
class
Dragboard
extends Clipboard with SFXDelegate[javafx.scene.input.Dragboard]
Wraps a JavaFX Dragboard.
-
class
GestureEvent
extends InputEvent with SFXDelegate[javafx.scene.input.GestureEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/GestureEvent.html
- class InputEvent extends Event with SFXDelegate[javafx.scene.input.InputEvent]
-
trait
InputIncludes
extends AnyRef
Contains implcit methods to convert from
javafx.scene.input
Classes/Traits to their ScalaFX counterparts. - class InputMethodEvent extends InputEvent with SFXDelegate[javafx.scene.input.InputMethodEvent]
- sealed case class InputMethodHighlight (delegate: javafx.scene.input.InputMethodHighlight) extends SFXEnumDelegate[javafx.scene.input.InputMethodHighlight] with Product with Serializable
- class InputMethodTextRun extends SFXDelegate[javafx.scene.input.InputMethodTextRun]
- class KeyCharacterCombination extends KeyCombination with SFXDelegate[javafx.scene.input.KeyCharacterCombination]
- sealed case class KeyCode (delegate: javafx.scene.input.KeyCode) extends SFXEnumDelegate[javafx.scene.input.KeyCode] with Product with Serializable
- class KeyCodeCombination extends KeyCombination with SFXDelegate[javafx.scene.input.KeyCodeCombination]
- abstract class KeyCombination extends SFXDelegate[javafx.scene.input.KeyCombination]
- class KeyEvent extends InputEvent with SFXDelegate[javafx.scene.input.KeyEvent]
- class Mnemonic extends FireDelegate[javafx.scene.input.Mnemonic] with SFXDelegate[javafx.scene.input.Mnemonic]
- sealed case class MouseButton (delegate: javafx.scene.input.MouseButton) extends SFXEnumDelegate[javafx.scene.input.MouseButton] with Product with Serializable
- class MouseDragEvent extends MouseEvent with SFXDelegate[javafx.scene.input.MouseDragEvent]
- class MouseEvent extends InputEvent with SFXDelegate[javafx.scene.input.MouseEvent]
-
class
PickResult
extends SFXDelegate[javafx.scene.input.PickResult]
A container for the result of a pick event.
A container for the result of a pick event. Wrapper for JavaFX's PickResult.
-
class
RotateEvent
extends InputEvent with SFXDelegate[javafx.scene.input.RotateEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/RotateEvent.html
-
class
ScrollEvent
extends GestureEvent with SFXDelegate[javafx.scene.input.ScrollEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/ScrollEvent.html
-
class
SwipeEvent
extends GestureEvent with SFXDelegate[javafx.scene.input.SwipeEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/SwipeEvent.html
-
class
TouchEvent
extends InputEvent with SFXDelegate[javafx.scene.input.TouchEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/TouchEvent.html
- class TouchPoint extends SFXDelegate[javafx.scene.input.TouchPoint]
- sealed case class TransferMode (delegate: javafx.scene.input.TransferMode) extends SFXEnumDelegate[javafx.scene.input.TransferMode] with Product with Serializable
-
class
ZoomEvent
extends GestureEvent with SFXDelegate[javafx.scene.input.ZoomEvent]
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/ZoomEvent.html
Value Members
- object Clipboard
- object ClipboardContent
- object ContextMenuEvent
- object DataFormat
- object DragEvent
-
object
Dragboard
Object companion for scalafx.scene.input.Dragboard.
- object GestureEvent
- object InputEvent
- object InputIncludes extends InputIncludes
- object InputMethodEvent
-
object
InputMethodHighlight
extends SFXEnumDelegateCompanion[javafx.scene.input.InputMethodHighlight, InputMethodHighlight] with Serializable
Wrapper for javafx.scene.input.InputMethodHighlight
- object InputMethodTextRun
- object KeyCharacterCombination
-
object
KeyCode
extends SFXEnumDelegateCompanion[javafx.scene.input.KeyCode, KeyCode] with Serializable
Wrapper for javafx.scene.input.KeyCode
- object KeyCodeCombination
- object KeyCombination
- object KeyEvent
- object Mnemonic
-
object
MouseButton
extends SFXEnumDelegateCompanion[javafx.scene.input.MouseButton, MouseButton] with Serializable
Wrapper for javafx.scene.input.MouseButton
- object MouseDragEvent
- object MouseEvent
- object PickResult
- object RotateEvent
- object ScrollEvent
- object SwipeEvent
- object TouchEvent
- object TouchPoint
-
object
TransferMode
extends SFXEnumDelegateCompanion[javafx.scene.input.TransferMode, TransferMode] with Serializable
Wrapper for javafx.scene.input.TransferMode
- object ZoomEvent
ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.x and and JavaFX 8. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX 2.0 or JavaFX 8 are supported.
Package Structure
ScalaFX package structure corresponds to JavaFX package structure, for instance
scalafx.animation
corresponds tojavafx.animation
.Example Usage
A basic ScalaFX application is created creating an object that is an instance of
JFXApp
. Following Java FX theatre metaphor, it contains astage
that contains ascene
. Astage
roughly corresponds to a window in a typical UI environment. Thescene
holds UI content presented to the user. In the example below, the content is a pane with a singlelabel
component.