Bug fix to UI

This commit is contained in:
Jamie Mac 2022-04-20 11:46:00 +01:00
parent 3b7d043b73
commit 0578b35408

View File

@ -50,10 +50,10 @@ public class StandardClassifierPane extends SettingsPane<StandardClassifierPara
final int ii = i; final int ii = i;
enableSwitch[i].selectedProperty().addListener((obsVal, oldVal, newVal)->{ enableSwitch[i].selectedProperty().addListener((obsVal, oldVal, newVal)->{
standardClassifier.getClassifiers().get(ii).getCTClassifierGraphics().getCTClassifierPane().setDisable(!enableSwitch[ii].isSelected()); disableClassifierPane(ii);
labels[ii].setDisable(!enableSwitch[ii].isSelected());
}); });
disableClassifierPane(ii); //need to call here or else when the pane is first created stuff is not disabled.
PamHBox hBox = new PamHBox(); PamHBox hBox = new PamHBox();
hBox.setSpacing(5); hBox.setSpacing(5);
@ -63,7 +63,9 @@ public class StandardClassifierPane extends SettingsPane<StandardClassifierPara
} }
return vBox; return vBox;
} }
private void disableClassifierPane(int ii) { private void disableClassifierPane(int ii) {
standardClassifier.getClassifiers().get(ii).getCTClassifierGraphics().getCTClassifierPane().setDisable(!enableSwitch[ii].isSelected()); standardClassifier.getClassifiers().get(ii).getCTClassifierGraphics().getCTClassifierPane().setDisable(!enableSwitch[ii].isSelected());