use of blue.orchestra.editor.blueSynthBuilder.EditModeOnly in project blue by kunstmusik.
the class BSBEditPane method getEditorForBSBObject.
private BSBObjectViewHolder getEditorForBSBObject(BSBObject bsbObj) {
Region objectView = BSBObjectEditorFactory.getView(bsbObj);
BooleanProperty editEnabledProperty = allowEditing ? bsbInterface.editEnabledProperty() : null;
BSBObjectViewHolder viewHolder = new BSBObjectViewHolder(editEnabledProperty, selection, groupsList, objectView);
if (objectView instanceof EditModeOnly) {
if (allowEditing) {
viewHolder.visibleProperty().bind(bsbInterface.editEnabledProperty());
} else {
viewHolder.setVisible(false);
}
}
if (bsbObj instanceof BSBGroup) {
BSBGroupView bsbGroupView = (BSBGroupView) objectView;
bsbGroupView.initialize(editEnabledProperty, selection, groupsList);
}
return viewHolder;
}
use of blue.orchestra.editor.blueSynthBuilder.EditModeOnly in project blue by kunstmusik.
the class BSBGroupView method addBSBObject.
protected void addBSBObject(BSBObject bsbObj) {
try {
Region objectView = BSBObjectEditorFactory.getView(bsbObj);
// FIXME
// BooleanProperty editEnabledProperty = allowEditing ? bsbInterface.editEnabledProperty() : null;
BSBObjectViewHolder viewHolder = new BSBObjectViewHolder(editEnabledProperty, selection, groupsList, objectView);
if (objectView instanceof EditModeOnly) {
if (editEnabledProperty != null) {
viewHolder.visibleProperty().bind(editEnabledProperty);
} else {
viewHolder.setVisible(false);
}
}
if (bsbObj instanceof BSBGroup) {
BSBGroupView bsbGroupView = (BSBGroupView) objectView;
bsbGroupView.initialize(editEnabledProperty, selection, groupsList);
}
editorPane.getChildren().add(viewHolder);
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
}
Aggregations