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.");
}
}
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);
}
}
Aggregations