Search in sources :

Example 6 with BlueProject

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();
    }
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject)

Example 7 with BlueProject

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();
}
Also used : GlobalOrcSco(blue.GlobalOrcSco) BlueProject(blue.projects.BlueProject)

Example 8 with BlueProject

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());
    }
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject)

Example 9 with BlueProject

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);
    }
}
Also used : BlueData(blue.BlueData) ScorePath(blue.ui.core.score.ScorePath) BlueProject(blue.projects.BlueProject) RenderTimeManager(blue.services.render.RenderTimeManager)

Example 10 with BlueProject

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;
}
Also used : BlueProjectManager(blue.projects.BlueProjectManager) BlueProject(blue.projects.BlueProject) JComponent(javax.swing.JComponent) JMenuItem(javax.swing.JMenuItem) File(java.io.File)

Aggregations

BlueProject (blue.projects.BlueProject)31 BlueData (blue.BlueData)18 File (java.io.File)6 BlueProjectManager (blue.projects.BlueProjectManager)4 Frame (java.awt.Frame)3 GlobalOrcSco (blue.GlobalOrcSco)2 DiskRenderSettings (blue.settings.DiskRenderSettings)2 ProjectProperties (blue.ProjectProperties)1 Tables (blue.Tables)1 ChannelList (blue.mixer.ChannelList)1 ProjectPluginEditor (blue.project.ProjectPluginEditor)1 Score (blue.score.Score)1 ScoreObject (blue.score.ScoreObject)1 AudioLayerChannelBinding (blue.score.layers.audio.ui.bindings.AudioLayerChannelBinding)1 AudioLayerGroupBinding (blue.score.layers.audio.ui.bindings.AudioLayerGroupBinding)1 Tempo (blue.score.tempo.Tempo)1 RenderTimeManager (blue.services.render.RenderTimeManager)1 NoteParseException (blue.soundObject.NoteParseException)1 PolyObject (blue.soundObject.PolyObject)1 OpcodeList (blue.udo.OpcodeList)1