Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditScenarioPropertiesAction.java
index 59ea206b944bdc27a6402aa3bc9d693294f8f8d1..311eb2a2816b719cf380ae0e08ee7d5821bbf41f 100644 (file)
@@ -17,6 +17,12 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
        private String subject;
        private ScenarioService _scenarioService;
        private ProjectElementService _projectElementService;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        /**
         * Serial version ID.
@@ -42,6 +48,9 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                myscenario = (Scenario) step.getOwner(); // The selected step belong to a scenario
                lasdate = datstring.format(myscenario.getLastModificationDate());
                subject = label.getString("label.study") + " " + mystudy.getTitle();
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
 
                return SUCCESS;
        }
@@ -58,6 +67,10 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
 
                mystudy.getMenu().refreshGivenStepItem(
                                getProjectElementService().getFirstStep(myscenario)); // For updating the scenario icon
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                return SUCCESS;
        }
 
@@ -136,4 +149,20 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                        ProjectElementService projectElementService) {
                _projectElementService = projectElementService;
        }
+       
+       /**
+        * Get the menuProperty.
+        * @return the menuProperty
+        */
+       public String getMenuProperty() {
+               return _menuProperty;
+       }
+
+       /**
+        * Set the menuProperty.
+        * @param menuProperty the menuProperty to set
+        */
+       public void setMenuProperty(String menuProperty) {
+               this._menuProperty = menuProperty;
+       }
 }
\ No newline at end of file