use of blue.projects.BlueProject in project blue by kunstmusik.
the class ParameterTimeManagerImpl method getTime.
@Override
public double getTime() {
if (RealtimeRenderManager.getInstance().isAuditioning()) {
return -1.0f;
}
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
if (project == null) {
return -1.0f;
}
BlueData data = project.getData();
if (data == null) {
return -1.0f;
}
double val = data.getRenderStartTime();
return val;
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class MainToolBar method reinitialize.
private void reinitialize() {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
BlueData data = null;
if (project != null) {
data = project.getData();
setData(data);
}
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class GlobalScoreTopComponent method reinitialize.
private void reinitialize() {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
if (project == null) {
scoreText.setText("");
scoreText.getJEditorPane().setEditable(false);
} else {
GlobalOrcSco localGlobals = project.getData().getGlobalOrcSco();
scoreText.setText(localGlobals.getGlobalSco());
scoreText.getJEditorPane().setEditable(true);
globalOrcSco = localGlobals;
}
undo.discardAllEdits();
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class BlueProjectPropertyChangeListener method propertyChange.
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (BlueProjectManager.CURRENT_PROJECT.equals(evt.getPropertyName())) {
BlueProject oldProject = (BlueProject) evt.getOldValue();
BlueProject newProject = (BlueProject) evt.getNewValue();
if (oldProject == newProject) {
return;
}
if (oldProject != null) {
detachListeners(oldProject);
}
for (AudioLayerGroupBinding binding : layerGroupBindings.values()) {
binding.clearBinding();
}
layerGroupBindings.clear();
for (AudioLayerChannelBinding binding : layerBindings.values()) {
binding.clearBinding();
}
layerBindings.clear();
if (newProject != null) {
synchronizeAudioLayersAndMixer(newProject.getData());
attachListeners(newProject);
}
currentProject = newProject;
}
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class ImportCsdAction method importCsdAction.
protected void importCsdAction() {
final Frame mainWindow = WindowManager.getDefault().getMainWindow();
List<File> rValue = FileChooserManager.getDefault().showOpenDialog(this.getClass(), mainWindow);
if (rValue.size() > 0) {
File temp = rValue.get(0);
if (!(temp.getName().trim().toLowerCase().endsWith(".csd"))) {
String errorMessage = BlueSystem.getString("message.file.incorrectEnding") + " .csd";
JOptionPane.showMessageDialog(mainWindow, errorMessage, "Error", JOptionPane.ERROR_MESSAGE);
}
/*
* if(!saveCheck()) { System.out.println("!saveCheck() in
* BlueMainFrame"); return;
*/
final Object[] values = { BlueSystem.getString("csd.import1"), BlueSystem.getString("csd.import2"), BlueSystem.getString("csd.import3") };
Object selectedValue = JOptionPane.showInputDialog(mainWindow, BlueSystem.getString("csd.importMethod.message"), BlueSystem.getString("csd.importMethod.title"), JOptionPane.INFORMATION_MESSAGE, null, values, values[0]);
if (selectedValue == null) {
return;
}
int modeType = 0;
for (int i = 0; i < values.length; i++) {
if (selectedValue == values[i]) {
modeType = i;
break;
}
}
BlueData tempData = CSDUtility.convertCSDtoBlue(temp, modeType);
if (tempData != null) {
BlueProject project = new BlueProject(tempData, null);
BlueProjectManager.getInstance().setCurrentProject(project);
} else {
JOptionPane.showMessageDialog(mainWindow, BlueSystem.getString("message.file.couldNotImport"), BlueSystem.getString("message.error"), JOptionPane.ERROR_MESSAGE);
}
}
// else if (rValue == JFileChooser.CANCEL_OPTION) {
// StatusDisplayer.getDefault().setStatusText(
// BlueSystem.getString("message.actionCancelled"));
// }
}
Aggregations