Salome HOME
Fix for mantis #0022093: To exclude the "In-Draft" state from drop-down list during...
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditScenarioPropertiesAction.java
index c6ddf7dc6cacdf6731f279ffa4a4e8fb08fe45f9..26a8d47a1299b9220a1753ce2aba3e0173acba73 100644 (file)
@@ -15,6 +15,9 @@ import org.splat.som.Step;
 import org.splat.som.StepRights;
 import org.splat.wapp.Constants;
 
+/**
+ * Action for scenario properties modification.
+ */
 public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
 
        /**
@@ -25,7 +28,7 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
        private transient Scenario _myscenario;
        private transient String _lasdate;
        private transient String _subject;
-       
+
        /**
         * Title of the selected scenario.
         */
@@ -51,7 +54,8 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                ResourceBundle custom = ResourceBundle.getBundle("som",
                                getApplicationSettings().getCurrentLocale());
                SimpleDateFormat datstring = new SimpleDateFormat(custom
-                               .getString("date.format")); // Locale date display format
+                               .getString("date.format"), getApplicationSettings()
+                               .getCurrentLocale()); // Locale date display format
                Step step;
 
                _openStudy = getOpenStudy();
@@ -104,6 +108,7 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
 
        /**
         * Rename the scenario functionality.
+        * 
         * @return SUCCESS
         */
        public String doEditScenarioTitle() {
@@ -113,14 +118,15 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                Iterator<Scenario> iter = scenarios.iterator();
                for (; iter.hasNext();) {
                        Scenario scenario = iter.next();
-                       if (openStudy.getSelectedScenarioId().equals(String.valueOf(scenario.getIndex()))) {
-                               scenario.setTitle(getSelectedScenarioTitle());                          
+                       if (openStudy.getSelectedScenarioId().equals(
+                                       String.valueOf(scenario.getIndex()))) {
+                               scenario.setTitle(getSelectedScenarioTitle());
                                _scenarioService.renameScenario(scenario);
                        }
                }
                return SUCCESS;
        }
-       
+
        // ==============================================================================================================================
        // Getters
        // ==============================================================================================================================
@@ -152,15 +158,13 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                return _subject;
        }
 
-
        public boolean isCheckedout() {
                return _myscenario.isCheckedout();
        }
-       
-       
 
        /**
         * Get the selectedScenarioTitle.
+        * 
         * @return the selectedScenarioTitle
         */
        public String getSelectedScenarioTitle() {
@@ -169,7 +173,9 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
 
        /**
         * Set the selectedScenarioTitle.
-        * @param selectedScenarioTitle the selectedScenarioTitle to set
+        * 
+        * @param selectedScenarioTitle
+        *            the selectedScenarioTitle to set
         */
        public void setSelectedScenarioTitle(final String selectedScenarioTitle) {
                _selectedScenarioTitle = selectedScenarioTitle;