mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 07:20:09 -08:00
Add a data model for the plugins displayed in the enabled plugins list.
This commit is contained in:
parent
cda09518c3
commit
88e4a87d81
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