createNewProfile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
File file = FileDialogUtils.chooseFile("Save DB Profile", DirectoryManager.getUserDirectory(), FileDialogUtils.SAVE);
if (file != null) {
DBProfileEditor editor = new DBProfileEditor(IGV.getMainFrame(), file.getAbsolutePath());
editor.setVisible(true);
}
}
});
JMenuItem editExistingProfile = new JMenuItem("Edit Existing Profile");
editExistingProfile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
File file = FileDialogUtils.chooseFile("Select .dbxml database profile");
if (file != null) {
if (!file.exists()) {
}
DBProfileEditor editor = new DBProfileEditor(IGV.getMainFrame(), file.getAbsolutePath());
editor.setVisible(true);
}
}
});
sqlDBProfileEditor.add(createNewProfile);
sqlDBProfileEditor.add(editExistingProfile);