Salome HOME
PMD violations are fixed
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / ToolBarSettings.java
1 /*****************************************************************************
2  * Company         EURIWARE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   28.10.2012
6  * @author         Author: Maria KRUCHININA
7  * @version        Revision: 
8  *****************************************************************************/
9
10 package org.splat.simer; 
11
12 /**
13  * Settings for tool bar.
14  * @author Maria KRUCHININA
15  *
16  */
17 public class ToolBarSettings {
18         
19         //=== MENUS==========================================
20
21         /**
22          * Property, is this tool the "None" one.
23          */
24         private  Boolean _isToolNone;
25         
26         /**
27          * Property, is this tool the "Standard" one.
28          */
29         private  Boolean _isToolStandard;
30         
31         /**
32          * Property, is this tool the "Study" one.
33          */
34         private  Boolean _isToolStudy;
35         
36         /**
37          * Property, is this tool the "Back" one.
38          */
39         private  Boolean _isToolBack;
40         
41         //=== OTHER OPERATIONS ============================
42         
43         /**
44          * Can the given User edit the given Study/Knowledge. 
45          */
46         private  Boolean _canUserEdit;
47         
48         /**
49          * It's for (popup.isEnabled("script") operation on the toolbar.jsp. 
50          */
51         private  Boolean _isEnabledScript;
52
53         /**
54      * Initialize the tool bar properties.
55      * @param toolProperty - parameter of tool bar.
56      */
57     public void intializeMenuBar (final String toolProperty) {
58         
59         setIsToolNone(false);
60         setIsToolStandard(false);
61         setIsToolStudy(false);
62         setIsToolBack(false);
63         
64         if ("none".equals(toolProperty)) {
65                 setIsToolNone(true);
66         } else if ("standard".equals(toolProperty)) {
67                 setIsToolStandard(true);
68         } else if ("study".equals(toolProperty)) {
69                 setIsToolStudy(true);
70         } else if ("back".equals(toolProperty)) {
71                 setIsToolBack(true);
72         } 
73     }
74         
75         //====== GETTERS AND SETERS ==============
76         
77         /**
78          * Get the isToolNone.
79          * @return the isToolNone
80          */
81         public Boolean getIsToolNone() {
82                 return _isToolNone;
83         }
84
85         /**
86          * Set the isToolNone.
87          * @param isToolNone the isToolNone to set
88          */
89         public void setIsToolNone(final Boolean isToolNone) {
90                 _isToolNone = isToolNone;
91         }
92
93         /**
94          * Get the isToolStandard.
95          * @return the isToolStandard
96          */
97         public Boolean getIsToolStandard() {
98                 return _isToolStandard;
99         }
100
101         /**
102          * Set the isToolStandard.
103          * @param isToolStandard the isToolStandard to set
104          */
105         public void setIsToolStandard(final Boolean isToolStandard) {
106                 _isToolStandard = isToolStandard;
107         }
108
109         /**
110          * Get the isToolStudy.
111          * @return the isToolStudy
112          */
113         public Boolean getIsToolStudy() {
114                 return _isToolStudy;
115         }
116
117         /**
118          * Set the isToolStudy.
119          * @param isToolStudy the isToolStudy to set
120          */
121         public void setIsToolStudy(final Boolean isToolStudy) {
122                 _isToolStudy = isToolStudy;
123         }
124
125         /**
126          * Get the isToolBack.
127          * @return the isToolBack
128          */
129         public Boolean getIsToolBack() {
130                 return _isToolBack;
131         }
132
133         /**
134          * Set the isToolBack.
135          * @param isToolBack the isToolBack to set
136          */
137         public void setIsToolBack(final Boolean isToolBack) {
138                 _isToolBack = isToolBack;
139         }
140
141         /**
142          * Get the canUserEdit.
143          * @return the canUserEdit
144          */
145         public Boolean getCanUserEdit() {
146                 return _canUserEdit;
147         }
148
149         /**
150          * Set the canUserEdit.
151          * @param canUserEdit the canUserEdit to set
152          */
153         public void setCanUserEdit(final Boolean canUserEdit) {
154                 _canUserEdit = canUserEdit;
155         }
156
157         /**
158          * Get the isEnabledScript.
159          * @return the isEnabledScript
160          */
161         public Boolean getIsEnabledScript() {
162                 return _isEnabledScript;
163         }
164
165         /**
166          * Set the isEnabledScript.
167          * @param isEnabledScript the isEnabledScript to set
168          */
169         public void setIsEnabledScript(final Boolean isEnabledScript) {
170                 _isEnabledScript = isEnabledScript;
171         }
172 }