if (JOptionPane.showConfirmDialog(view, "Target exists! Overwrite?", "", JOptionPane.YES_NO_OPTION) == 1) {
throw new CoreException();
}
}
model.setColorProfilePath(filename);
Props colProps = new Props();
colProps.setHeader("COL - created by " + Constants.APP_NAME + " " + Constants.APP_VERSION);
for (int i=0; i< model.getSelectedColors().length; i++) {
String s = String.valueOf(model.getSelectedColors()[i].getRed()) + "," + model.getSelectedColors()[i].getGreen() + "," + model.getSelectedColors()[i].getBlue();
colProps.set("Color_" + i, s);
}
colProps.save(model.getColorProfilePath());
} catch (CoreException ex) {
if (ex.getMessage() != null) {
JOptionPane.showMessageDialog(view, ex.getMessage(), "Error!", JOptionPane.WARNING_MESSAGE);
}
}