From 482c3c2dd13746f5111db30950c66fb3a2ae5cf5 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 2 Aug 2017 18:39:00 -0700 Subject: [PATCH] Add a data model for the plugins displayed in the enabled plugins list. --- .../org/nwapw/abacus/fx/ToggleablePlugin.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java diff --git a/src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java b/src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java new file mode 100644 index 0000000..e311819 --- /dev/null +++ b/src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java @@ -0,0 +1,29 @@ +package org.nwapw.abacus.fx; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; + +public class ToggleablePlugin { + + private final BooleanProperty enabled; + private final String className; + + public ToggleablePlugin(boolean enabled, String className){ + this.enabled = new SimpleBooleanProperty(); + this.enabled.setValue(enabled); + this.className = className; + } + + public BooleanProperty enabledProperty() { + return enabled; + } + + public boolean isEnabled() { + return enabled.get(); + } + + public String getClassName() { + return className; + } + +}