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.
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 Java List
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.
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.
Wraps a JavaFX Dragboard.
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/GestureEvent.html
Contains implcit methods to convert from
javafx.scene.input
Classes/Traits to their ScalaFX counterparts.
A container for the result of a pick event.
A container for the result of a pick event. Wrapper for JavaFX's PickResult.
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/RotateEvent.html
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/ScrollEvent.html
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/SwipeEvent.html
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/TouchEvent.html
Wraps http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/ZoomEvent.html
Object companion for scalafx.scene.input.Dragboard.
Wrapper for javafx.scene.input.InputMethodHighlight
Wrapper for javafx.scene.input.KeyCode
Wrapper for javafx.scene.input.MouseButton
Wrapper for javafx.scene.input.TransferMode
Wraps
javafx.scene.input
package.