]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/DisplayKnowledgeAction.java
Salome HOME
Actions menu properties are refactored, unnecessary code is removed.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / DisplayKnowledgeAction.java
index 6e7d0324b2c1d70930110fd64d90db14844428ae..95034900a3d5f99229915a17956c5821414057a8 100644 (file)
@@ -23,37 +23,6 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
         * Injected knowledge element service.
         */
        private KnowledgeElementService _knowledgeElementService;
-       
-       /**
-        * Value of the menu property. 
-        * It can be: none, create, open, study, knowledge, sysadmin, help.
-        */
-       private String _menuProperty;
-       
-       /**
-        * Value of the title bar property. 
-        * It can be: study, knowledge.
-        */
-       private String _titleProperty;
-       
-       /**
-        * Value of the tool bar property. 
-        * It can be: none, standard, study, back.
-        */
-       private String _toolProperty;
-       
-       /**
-        * Value of the left menu property. 
-        * It can be: open, study, knowledge, scenario.
-        */
-       private String _leftMenuProperty;
-       
-       /**
-        * Property that indicates whether the current open study is editable or not.
-        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
-        * It is necessary for correct building the title bar.
-        */
-       private String _editDisabledProperty = "false";
 
        // ==============================================================================================================================
        // Action methods
@@ -85,12 +54,10 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
                        }
                }
                getSession().put("menu.knowledge", _myknelm.getMenu());
-               
-               setMenuProperty(Constants.KNOWLEDGE_MENU);
-               setTitleProperty(Constants.KNOWLEDGE_MENU);
-               setToolProperty(Constants.NONE);
-               setLeftMenuProperty(Constants.KNOWLEDGE_MENU);
-               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               initializationFullScreenContext(Constants.KNOWLEDGE_MENU,
+                               Constants.KNOWLEDGE_MENU, Constants.FALSE, Constants.NONE,
+                               Constants.KNOWLEDGE_MENU);
 
                return SUCCESS;
        }
@@ -103,13 +70,11 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
                } else { // Selection of a step of current study
                        _myknelm.setSelection(_selection);
                }
-               
-               setMenuProperty(Constants.KNOWLEDGE_MENU);
-               setTitleProperty(Constants.KNOWLEDGE_MENU);
-               setToolProperty(Constants.NONE);
-               setLeftMenuProperty(Constants.KNOWLEDGE_MENU);
-               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
-               
+
+               initializationFullScreenContext(Constants.KNOWLEDGE_MENU,
+                               Constants.KNOWLEDGE_MENU, Constants.FALSE, Constants.NONE,
+                               Constants.KNOWLEDGE_MENU);
+
                return SUCCESS;
        }
 
@@ -123,13 +88,11 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
                } else if (todo == Execute.reduceall) {
                        _myknelm.reduceDocument(_myindex);
                }
-               
-               setMenuProperty(Constants.KNOWLEDGE_MENU);
-               setTitleProperty(Constants.KNOWLEDGE_MENU);
-               setToolProperty(Constants.NONE);
-               setLeftMenuProperty(Constants.KNOWLEDGE_MENU);
-               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
-               
+
+               initializationFullScreenContext(Constants.KNOWLEDGE_MENU,
+                               Constants.KNOWLEDGE_MENU, Constants.FALSE, Constants.NONE,
+                               Constants.KNOWLEDGE_MENU);
+
                return SUCCESS;
        }
 
@@ -141,22 +104,19 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
                } else if (todo == Execute.reduce) {
                        _myknelm.reduceKnowledge(_myindex);
                }
-               
-               setMenuProperty(Constants.KNOWLEDGE_MENU);
-               setTitleProperty(Constants.KNOWLEDGE_MENU);
-               setToolProperty(Constants.NONE);
-               setLeftMenuProperty(Constants.KNOWLEDGE_MENU);
-               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
-               
+
+               initializationFullScreenContext(Constants.KNOWLEDGE_MENU,
+                               Constants.KNOWLEDGE_MENU, Constants.FALSE, Constants.NONE,
+                               Constants.KNOWLEDGE_MENU);
+
                return SUCCESS;
        }
 
        public String doClose() {
                closeKnowledge();
-               
-               setMenuProperty(Constants.NONE);
-               initializationScreenContext(_menuProperty);
-               
+
+               initializationScreenContext(Constants.NONE);
+
                return SUCCESS;
        }
 
@@ -204,84 +164,4 @@ public class DisplayKnowledgeAction extends AbstractDisplayAction {
                        final KnowledgeElementService knowledgeElementService) {
                _knowledgeElementService = knowledgeElementService;
        }
-       
-       /**
-        * Get the menuProperty.
-        * @return the menuProperty
-        */
-       public String getMenuProperty() {
-               return _menuProperty;
-       }
-
-       /**
-        * Set the menuProperty.
-        * @param menuProperty the menuProperty to set
-        */
-       public void setMenuProperty(final String menuProperty) {
-               this._menuProperty = menuProperty;
-       }
-       
-       /**
-        * Get the _titleProperty.
-        * @return the _titleProperty
-        */
-       public String getTitleProperty() {
-               return _titleProperty;
-       }
-
-       /**
-        * Set the _titleProperty.
-        * @param _titleProperty the titleProperty to set
-        */
-       public void setTitleProperty(final String titleProperty) {
-               _titleProperty = titleProperty;
-       }
-
-       /**
-        * Get the _editDisabledProperty.
-        * @return the _editDisabledProperty
-        */
-       public final String getEditDisabledProperty() {
-               return _editDisabledProperty;
-       }
-
-       /**
-        * Set the editDisabledProperty.
-        * @param editDisabledProperty the editDisabledProperty to set
-        */
-       public final void setEditDisabledProperty(final String editDisabledProperty) {
-               this._editDisabledProperty = editDisabledProperty;
-       }
-
-       /**
-        * Get the toolProperty.
-        * @return the toolProperty
-        */
-       public String getToolProperty() {
-               return _toolProperty;
-       }
-
-       /**
-        * Set the toolProperty.
-        * @param toolProperty the toolProperty to set
-        */
-       public void setToolProperty(final String toolProperty) {
-               _toolProperty = toolProperty;
-       }
-       
-       /**
-        * Get the leftMenuProperty.
-        * @return the leftMenuProperty
-        */
-       public String getLeftMenuProperty() {
-               return _leftMenuProperty;
-       }
-
-       /**
-        * Set the leftMenuProperty.
-        * @param leftMenuProperty the leftMenuProperty to set
-        */
-       public void setLeftMenuProperty(final String leftMenuProperty) {
-               _leftMenuProperty = leftMenuProperty;
-       }
 }
\ No newline at end of file