]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/Action.java
Salome HOME
Actions menu properties are refactored, unnecessary code is removed.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / Action.java
index 04a62538b6c01b8916b5b3b8e46f6c0efc3e2a64..ff3235524a018b4b2a0307789998e168a3dbbfba 100644 (file)
@@ -109,6 +109,14 @@ public class Action extends ActionSupport implements ServletRequestAware,
         * Injected application settings bean.
         */
        private ApplicationSettings _applicationSettings;
+       /**
+        * Value of the menu property. It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
+       /**
+        * Value of the tool bar property. It can be: none, standard, study, back.
+        */
+       private String _toolProperty;
 
        /**
         * Comparator for sorting document types with localized names.
@@ -417,6 +425,7 @@ public class Action extends ActionSupport implements ServletRequestAware,
        public void initializationScreenContext(final String menuProperty) {
 
                initializationContext();
+               setMenuProperty(menuProperty);
                getMenuBarSettings().intializeMenuBar(menuProperty);
        }
 
@@ -434,6 +443,7 @@ public class Action extends ActionSupport implements ServletRequestAware,
                        final String titleProperty, final String editDisabledProperty) {
 
                initializationContext(titleProperty, editDisabledProperty);
+               setMenuProperty(menuProperty);
                getMenuBarSettings().intializeMenuBar(menuProperty);
        }
 
@@ -470,6 +480,7 @@ public class Action extends ActionSupport implements ServletRequestAware,
                        final String toolProperty) {
 
                initializationContext();
+               setMenuProperty(menuProperty);
                getMenuBarSettings().intializeMenuBar(menuProperty);
                getToolBarSettings().intializeMenuBar(toolProperty);
        }
@@ -513,6 +524,7 @@ public class Action extends ActionSupport implements ServletRequestAware,
 
                initializationContext();
                initializationContextLeftMenus(leftMenuProperty);
+               setMenuProperty(menuProperty);
                getMenuBarSettings().intializeMenuBar(menuProperty);
                getToolBarSettings().intializeMenuBar(toolProperty);
        }
@@ -703,4 +715,42 @@ public class Action extends ActionSupport implements ServletRequestAware,
        public void setMessage(final String message) {
                _message = message;
        }
+
+       /**
+        * Get the menuProperty.
+        * 
+        * @return the menuProperty
+        */
+       public String getMenuProperty() {
+               return _menuProperty;
+       }
+
+       /**
+        * Get the toolProperty.
+        * 
+        * @return the toolProperty
+        */
+       public String getToolProperty() {
+               return _toolProperty;
+       }
+
+       /**
+        * Set the menuProperty.
+        * 
+        * @param menuProperty
+        *            the menuProperty to set
+        */
+       public void setMenuProperty(final String menuProperty) {
+               this._menuProperty = menuProperty;
+       }
+
+       /**
+        * Set the toolProperty.
+        * 
+        * @param toolProperty
+        *            the toolProperty to set
+        */
+       public void setToolProperty(final String toolProperty) {
+               _toolProperty = toolProperty;
+       }
 }
\ No newline at end of file