PreviewPanel

class PreviewPanel(getGenerator: () -> DataInsertAction)(source)

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.

Constructors

Link copied to clipboard
constructor(getGenerator: () -> DataInsertAction)

Properties

Link copied to clipboard
lateinit var rootPane: JPanel

The root panel containing the preview elements.

Functions

Link copied to clipboard

Updates the preview with the current settings.

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.