mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 16:09:32 -08:00
Add missing comments.
This commit is contained in:
parent
83fcd40027
commit
1b603ef902
|
@ -2,10 +2,28 @@ package org.nwapw.abacus.fx
|
||||||
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty
|
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) {
|
class ToggleablePlugin (val className: String, enabled: Boolean) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The property used to interact with JavaFX components.
|
||||||
|
*/
|
||||||
val enabledProperty = SimpleBooleanProperty(enabled)
|
val enabledProperty = SimpleBooleanProperty(enabled)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether this plugin is currently enabled or not.
|
||||||
|
*
|
||||||
|
* @return true if it is enabled, false otherwise.
|
||||||
|
*/
|
||||||
fun isEnabled(): Boolean {
|
fun isEnabled(): Boolean {
|
||||||
return enabledProperty.value
|
return enabledProperty.value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user