mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
save project default properties
This commit is contained in:
+12
-3
@@ -829,8 +829,8 @@ public class Presenter implements IPlugInPort {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setDefaultPropertyValue(String propertyName, Object value) {
|
||||
LOG.info(String.format("setDefaultPropertyValue(%s, %s)", propertyName, value));
|
||||
public void setSelectionDefaultPropertyValue(String propertyName, Object value) {
|
||||
LOG.info(String.format("setSelectionDefaultPropertyValue(%s, %s)", propertyName, value));
|
||||
for (IDIYComponent component : selectedComponents) {
|
||||
String className = component.getClass().getName();
|
||||
LOG.debug("Default property value set for " + className + ":" + propertyName);
|
||||
@@ -839,6 +839,14 @@ public class Presenter implements IPlugInPort {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProjectDefaultPropertyValue(String propertyName, Object value) {
|
||||
LOG.info(String.format("setProjectDefaultPropertyValue(%s, %s)", propertyName, value));
|
||||
LOG.debug("Default property value set for " + Project.class.getName() + ":" + propertyName);
|
||||
ConfigurationManager.getInstance().setConfigurationItem(
|
||||
DEFAULTS_KEY + Project.class.getName() + ":" + propertyName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMetric(boolean isMetric) {
|
||||
ConfigurationManager.getInstance().setConfigurationItem(Presenter.METRIC_KEY, isMetric);
|
||||
@@ -1104,7 +1112,8 @@ public class Presenter implements IPlugInPort {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not apply selection properties", e);
|
||||
view.showMessage("Could not apply changes to the selection. Check the log for details.",
|
||||
view.showMessage(
|
||||
"Could not apply changes to the selection. Check the log for details.",
|
||||
"Error", JOptionPane.ERROR_MESSAGE);
|
||||
} finally {
|
||||
// Notify the listeners.
|
||||
|
||||
Reference in New Issue
Block a user