mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 07:20:09 -08:00
Add missing comments.
This commit is contained in:
parent
e71b037195
commit
12710c625b
|
@ -2,10 +2,28 @@ package org.nwapw.abacus.fx
|
|||
|
||||
import javafx.beans.property.SimpleBooleanProperty
|
||||
|
||||
/**
|
||||
* A model representing a plugin that can be disabled or enabled.
|
||||
*
|
||||
* ToggleablePlugin is a model that is used to present to the user the option
|
||||
* of disabling / enabling plugins. The class name in this plugin is stored if
|
||||
* its "enabledPropery" is false, essentially blacklisting the plugin.
|
||||
*
|
||||
* @param className the name of the class that this model concerns.
|
||||
* @param enabled whether or not the model should start enabled.
|
||||
*/
|
||||
class ToggleablePlugin (val className: String, enabled: Boolean) {
|
||||
|
||||
/**
|
||||
* The property used to interact with JavaFX components.
|
||||
*/
|
||||
val enabledProperty = SimpleBooleanProperty(enabled)
|
||||
|
||||
/**
|
||||
* Checks whether this plugin is currently enabled or not.
|
||||
*
|
||||
* @return true if it is enabled, false otherwise.
|
||||
*/
|
||||
fun isEnabled(): Boolean {
|
||||
return enabledProperty.value
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user