X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Workspace%2FSiman%2Fsrc%2Forg%2Fsplat%2Fsimer%2FEditScenarioPropertiesAction.java;h=884426e3882c7f1572f2dd301a0de923673ea5c3;hb=7025b5bbe666dff7c10cb1200b1eaec66b7bc232;hp=dc3036ba3394c136834726db18c49fb14405d26e;hpb=f3ca2dec8c9fdfeac0b9ecac5d5783a6aa4f6c3a;p=tools%2Fsiman.git diff --git a/Workspace/Siman/src/org/splat/simer/EditScenarioPropertiesAction.java b/Workspace/Siman/src/org/splat/simer/EditScenarioPropertiesAction.java index dc3036b..884426e 100644 --- a/Workspace/Siman/src/org/splat/simer/EditScenarioPropertiesAction.java +++ b/Workspace/Siman/src/org/splat/simer/EditScenarioPropertiesAction.java @@ -36,6 +36,12 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction { * It is necessary for correct building the title bar. */ private String _editDisabledProperty = "false"; + + /** + * Value of the tool bar property. + * It can be: none, standard, study, back. + */ + private String _toolProperty; /** * Serial version ID. @@ -65,7 +71,8 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction { setMenuProperty("study"); setTitleProperty("study"); setEditDisabledProperty("true"); - initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty); + setToolProperty("back"); + initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty); return SUCCESS; } @@ -84,7 +91,13 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction { getProjectElementService().getFirstStep(myscenario)); // For updating the scenario icon setMenuProperty("study"); - initializationScreenContext(_menuProperty); + if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()) { + setToolProperty("study"); + } else { + setToolProperty("standard"); + } + initializationScreenContext(_menuProperty, _toolProperty); + return SUCCESS; } @@ -213,5 +226,19 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction { _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