TemplateListEditor

class TemplateListEditor(val originalTemplateList: TemplateList = Settings.DEFAULT.templateList, initialSelection: String? = null) : Disposable(source)

Component for editing a TemplateLists.

The editor essentially has a master-detail layout. On the left, a TemplateJTree shows all templates and the schemes contained within them, and on the right, a SchemeEditor for the currently-selected template or scheme is shown.

Parameters

initialSelection

the UUID of the scheme to select initially, or null or an invalid UUID to select the first template

See also

Constructors

Link copied to clipboard
constructor(originalTemplateList: TemplateList = Settings.DEFAULT.templateList, initialSelection: String? = null)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard

The templates to edit.

Link copied to clipboard
val rootComponent: JPanel

The root component of the editor.

Functions

Link copied to clipboard
fun apply()

Saves the editor's state into originalTemplateList.

Link copied to clipboard
open override fun dispose()

Disposes this editor's resources.

Link copied to clipboard
fun doValidate(): String?

Validates the state of the editor and indicates whether and why it is invalid.

Link copied to clipboard
fun isModified(): Boolean

Returns true if and only if the editor contains modifications relative to the last saved state.

Link copied to clipboard
fun reset()

Resets the editor's state to the last saved state.