Salome HOME
Tool bar is improved.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / DisplayKnowledgeAction.java
index d6c6c3d763589ffaa2054d6ade4eb432676f27e7..61c252279661e987cbb59198c941ae0a9fc2bfde 100644 (file)
@@ -28,6 +28,25 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
         * 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;
+       
+       /**
+        * 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
@@ -59,7 +78,9 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                getSession().put("menu.knowledge", myknelm.getMenu());
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+               setToolProperty("none");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
 
                return SUCCESS;
        }
@@ -74,7 +95,9 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                }
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+               setToolProperty("none");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
                
                return SUCCESS;
        }
@@ -90,7 +113,9 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                        myknelm.reduceDocument(myindex);
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+               setToolProperty("none");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
                
                return SUCCESS;
        }
@@ -104,7 +129,9 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                        myknelm.reduceKnowledge(myindex);
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+               setToolProperty("none");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
                
                return SUCCESS;
        }
@@ -177,4 +204,52 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
        public void setMenuProperty(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(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(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;
+       }
 }
\ No newline at end of file