use of net.sf.launch4j.binding.BindingException in project cogtool by cogtool.
the class MainFrame method save.
private boolean save() {
// XXX
try {
_configForm.get(ConfigPersister.getInstance().getConfig());
if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
File f = _fileChooser.getSelectedFile();
if (!f.getPath().endsWith(".xml")) {
f = new File(f.getPath() + ".xml");
}
ConfigPersister.getInstance().save(f);
_saved = true;
showConfigName(f);
return true;
}
return false;
} catch (InvariantViolationException ex) {
warn(ex);
return false;
} catch (BindingException ex) {
warn(ex.getMessage());
return false;
} catch (ConfigPersisterException ex) {
warn(ex.getMessage());
return false;
}
}
use of net.sf.launch4j.binding.BindingException in project chipKIT32-MAX by chipKIT32.
the class MainFrame method save.
private boolean save() {
// XXX
try {
_configForm.get(ConfigPersister.getInstance().getConfig());
if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
File f = _fileChooser.getSelectedFile();
if (!f.getPath().endsWith(".xml")) {
f = new File(f.getPath() + ".xml");
}
ConfigPersister.getInstance().save(f);
_saved = true;
showConfigName(f);
return true;
}
return false;
} catch (InvariantViolationException ex) {
warn(ex);
return false;
} catch (BindingException ex) {
warn(ex.getMessage());
return false;
} catch (ConfigPersisterException ex) {
warn(ex.getMessage());
return false;
}
}
use of net.sf.launch4j.binding.BindingException in project megameklab by MegaMek.
the class MainFrame method save.
private boolean save() {
// XXX
try {
_configForm.get(ConfigPersister.getInstance().getConfig());
if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
File f = _fileChooser.getSelectedFile();
if (!f.getPath().endsWith(".xml")) {
f = new File(f.getPath() + ".xml");
}
ConfigPersister.getInstance().save(f);
_saved = true;
showConfigName(f);
return true;
}
return false;
} catch (InvariantViolationException ex) {
warn(ex);
return false;
} catch (BindingException ex) {
warn(ex.getMessage());
return false;
} catch (ConfigPersisterException ex) {
warn(ex.getMessage());
return false;
}
}
use of net.sf.launch4j.binding.BindingException in project beast-mcmc by beast-dev.
the class MainFrame method save.
private boolean save() {
try {
_configForm.get(ConfigPersister.getInstance().getConfig());
if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
File f = _fileChooser.getSelectedFile();
if (!f.getPath().endsWith(".xml")) {
f = new File(f.getPath() + ".xml");
}
ConfigPersister.getInstance().save(f);
_saved = true;
showConfigName(f);
return true;
}
return false;
} catch (InvariantViolationException ex) {
warn(ex);
return false;
} catch (BindingException ex) {
warn(ex.getMessage());
return false;
} catch (ConfigPersisterException ex) {
warn(ex.getMessage());
return false;
}
}
use of net.sf.launch4j.binding.BindingException in project SIMRacingApps by SIMRacingApps.
the class MainFrame method save.
private boolean save() {
try {
_configForm.get(ConfigPersister.getInstance().getConfig());
if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
File f = _fileChooser.getSelectedFile();
if (!f.getPath().endsWith(".xml")) {
f = new File(f.getPath() + ".xml");
}
ConfigPersister.getInstance().save(f);
_saved = true;
showConfigName(f);
return true;
}
return false;
} catch (InvariantViolationException ex) {
warn(ex);
return false;
} catch (BindingException ex) {
warn(ex.getMessage());
return false;
} catch (ConfigPersisterException ex) {
warn(ex.getMessage());
return false;
}
}
Aggregations