21import java.awt.Component;
24import javax.swing.JFileChooser;
25import javax.swing.filechooser.FileNameExtensionFilter;
26import javax.swing.filechooser.FileSystemView;
28import denoptim.files.FileAndFormat;
29import denoptim.files.FileFormat;
30import denoptim.files.FileFormat.DataKind;
44 File startFile =
new File(System.getProperty(
"user.dir"));
45 while (!FileSystemView.getFileSystemView().isFileSystemRoot(startFile))
47 startFile = startFile.getParentFile();
56 FileNameExtensionFilter sdfFilter =
new FileNameExtensionFilter(
59 FileNameExtensionFilter jsonFilter =
new FileNameExtensionFilter(
64 if (
fileChooser.showSaveDialog(parent) == JFileChooser.APPROVE_OPTION)
82 FileNameExtensionFilter sdfFilter =
new FileNameExtensionFilter(
85 FileNameExtensionFilter jsonFilter =
new FileNameExtensionFilter(
90 if (
fileChooser.showSaveDialog(parent) == JFileChooser.APPROVE_OPTION)
109 if (
fileChooser.showSaveDialog(parent) == JFileChooser.APPROVE_OPTION)
GUI component to provide pathname where to save stuff.
static FileAndFormat pickFileForSavingCuttingRules(Component parent)
static JFileChooser fileChooser
static File getSystemRoot()
static FileAndFormat pickFileForSavingVertexes(Component parent)
static FileAndFormat pickFileForSavingGraphs(Component parent)