PreviewPanel

class PreviewPanel(getGenerator: () -> DataInsertAction)

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

Generates a random value that the given DataInsertAction 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

getGenerator

returns a DataInsertAction that uses the given source of randomness

Constructors

PreviewPanel
Link copied to clipboard
fun PreviewPanel(getGenerator: () -> DataInsertAction)
returns a DataInsertAction that uses the given source of randomness

Functions

updatePreview
Link copied to clipboard
fun updatePreview()
Updates the preview with the current settings.
updatePreviewOnUpdateOf
Link copied to clipboard
fun updatePreviewOnUpdateOf(vararg components: Any)
Adds listeners to the given components so that this preview is updated whenever the given components are updated.

Properties

rootPane
Link copied to clipboard
lateinit var rootPane: JPanel
The root panel containing the preview elements.

Sources

jvm source
Link copied to clipboard