PreviewPanel

class PreviewPanel(getScheme: () -> Scheme) : Disposable(source)

A panel that shows a preview of the values generated by a scheme.

Generates a random value that the scheme from getScheme could generate as a preview to the user. By reusing the same seed, the generated value remains (approximately) the same and the user can easily see the effect of their changes. After registering some components with this panel, the preview will be updated whenever those components are updated.

Parameters

getScheme

returns a scheme that generates previews; its random source will be changed

Constructors

Link copied to clipboard
constructor(getScheme: () -> Scheme)

Properties

Link copied to clipboard
var previewText: String

The text currently displayed as the preview.

Link copied to clipboard
val rootComponent: JPanel

The root panel containing the preview elements.

Functions

Link copied to clipboard
open override fun dispose()

Disposes this panel's resources, to be used when this panel is no longer used.

Link copied to clipboard

Updates the preview with the current settings.