mirror of
https://github.com/DanilaFe/abacus
synced 2024-09-07 00:03:05 -07:00
Add a data model for the plugins displayed in the enabled plugins list.
This commit is contained in:
parent
d05850edfa
commit
482c3c2dd1
29
src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java
Normal file
29
src/main/java/org/nwapw/abacus/fx/ToggleablePlugin.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user