From 1b603ef902a89b29c67ce9c0b18edbc14fa45651 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 7 Aug 2017 22:48:56 -0700 Subject: [PATCH] Add missing comments. --- .../org/nwapw/abacus/fx/ToggleablePlugin.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/kotlin/org/nwapw/abacus/fx/ToggleablePlugin.kt b/src/main/kotlin/org/nwapw/abacus/fx/ToggleablePlugin.kt index b575217..e046209 100644 --- a/src/main/kotlin/org/nwapw/abacus/fx/ToggleablePlugin.kt +++ b/src/main/kotlin/org/nwapw/abacus/fx/ToggleablePlugin.kt @@ -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 }