intellij-randomness / com.fwdekker.randomness.ui / PreviewPanel / <init>

<init>

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