Search in sources :

Example 6 with FileChooserManager

use of blue.ui.utilities.FileChooserManager in project blue by kunstmusik.

the class OpenProjectAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    FileChooserManager fcm = FileChooserManager.getDefault();
    List<File> rValue = fcm.showOpenDialog(this.getClass(), WindowManager.getDefault().getMainWindow());
    if (rValue.size() > 0) {
        BlueProjectManager projectManager = BlueProjectManager.getInstance();
        for (File temp : rValue) {
            if (temp.getName().trim().endsWith(".patterns")) {
            // openPatternsFile(temp);
            } else {
                if (!(temp.getName().trim().endsWith(".blue"))) {
                    temp = new File(temp.getAbsolutePath() + ".blue");
                }
                BlueProject project = projectManager.findProjectFromFile(temp);
                if (project != null) {
                    projectManager.setCurrentProject(project);
                    continue;
                }
                open(temp);
            }
        }
    } else {
        StatusDisplayer.getDefault().setStatusText("No files selected.");
    }
}
Also used : FileChooserManager(blue.ui.utilities.FileChooserManager) AudioFile(blue.soundObject.AudioFile) File(java.io.File)

Example 7 with FileChooserManager

use of blue.ui.utilities.FileChooserManager in project blue by kunstmusik.

the class ScannedMatrixEditor method loadMatrix.

public void loadMatrix() {
    final FileChooserManager fcm = FileChooserManager.getDefault();
    List<File> rValue = fcm.showOpenDialog(FILE_LOAD, null);
    if (!rValue.isEmpty()) {
        File temp = rValue.get(0);
        matrixGridEditor.loadMatrix(temp);
    }
}
Also used : FileChooserManager(blue.ui.utilities.FileChooserManager) File(java.io.File)

Aggregations

FileChooserManager (blue.ui.utilities.FileChooserManager)7 File (java.io.File)7 FileWriter (java.io.FileWriter)2 IOException (java.io.IOException)2 PrintWriter (java.io.PrintWriter)2 ExtensionFilter (javafx.stage.FileChooser.ExtensionFilter)2 NotifyDescriptor (org.openide.NotifyDescriptor)2 BlueData (blue.BlueData)1 ScoreObject (blue.score.ScoreObject)1 AudioFile (blue.soundObject.AudioFile)1 FrozenSoundObject (blue.soundObject.FrozenSoundObject)1 PolyObject (blue.soundObject.PolyObject)1