use of blue.projects.BlueProject in project blue by kunstmusik.
the class BlueLiveToolBar method reinitialize.
private void reinitialize() {
this.data = null;
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
BlueData currentData = null;
if (project != null) {
this.data = project.getData();
}
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class GlobalOrchestraTopComponent method reinitialize.
private void reinitialize() {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
if (project == null) {
editor.setText("");
editor.getJEditorPane().setEditable(false);
} else {
GlobalOrcSco localGlobals = project.getData().getGlobalOrcSco();
editor.setText(localGlobals.getGlobalOrc());
editor.getJEditorPane().setEditable(true);
globalOrcSco = localGlobals;
}
editor.getJEditorPane().setCaretPosition(0);
undo.discardAllEdits();
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class MidiInputPanelTopComponent method reinitialize.
protected void reinitialize() {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
BlueData data = null;
if (project != null) {
data = project.getData();
midiInputProcessorPanel1.setMidiInputProcessor(data.getMidiInputProcessor());
}
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class AddMarkerAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
if (project == null) {
return;
}
BlueData data = project.getData();
if (data == null) {
return;
}
RenderTimeManager timeManager = Lookup.getDefault().lookup(RenderTimeManager.class);
ScorePath path = ScoreController.getInstance().getScorePath();
if (path.getLastLayerGroup() == null) {
double markerTime = MainToolBar.getInstance().isRendering() ? timeManager.getRenderTime() + timeManager.getRenderStartTime() : data.getRenderStartTime();
data.getMarkersList().addMarker(markerTime);
}
}
use of blue.projects.BlueProject in project blue by kunstmusik.
the class CurrentProjectsAction method getMenuPresenters.
@Override
public JComponent[] getMenuPresenters() {
BlueProjectManager manager = BlueProjectManager.getInstance();
if (manager.getNumProjects() == 0) {
return new JComponent[0];
}
JComponent[] items = new JComponent[manager.getNumProjects()];
for (int i = 0; i < manager.getNumProjects(); i++) {
BlueProject proj = manager.getProject(i);
File f = proj.getDataFile();
String name = (f == null) ? "[new blue project]" : f.getName();
JMenuItem menuItem = new JMenuItem(i + " " + name);
menuItem.putClientProperty("project", proj);
menuItem.setMnemonic(Integer.toString(i).charAt(0));
menuItem.setEnabled(proj != manager.getCurrentProject());
menuItem.addActionListener(al);
items[i] = menuItem;
}
return items;
}
Aggregations