map.put(ActionKey.MAIN_SAVE, new PolicyAction(ActionKey.MAIN_SAVE, rb.getString("save"), PolicyUtilities.createImageIcon("/images/save_24.png")) {
@Override
public void actionPerformed(ActionEvent e) {
XMLPolicyDBWriter writer = new XMLPolicyDBWriter();
try {
writer.savePolicyDB(dbModel.getFilePath());
} catch (Exception ex) {
Logger.getLogger(ActionFactory.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
map.put(ActionKey.MAIN_SAVEAS, new PolicyAction(ActionKey.MAIN_SAVEAS, rb.getString("saveas"), PolicyUtilities.createImageIcon("/images/save_24.png")) {
@Override
public void actionPerformed(ActionEvent e) {
XMLPolicyDBWriter writer = new XMLPolicyDBWriter();
try {
String path = PolicyUtilities.showSaveDialog();
writer.savePolicyDB(path);
} catch (Exception ex) {
Logger.getLogger(ActionFactory.class.getName()).log(Level.SEVERE, null, ex);
}
}
});