View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.component;
17  
18  /**
19   * Declares methods for retrieving the event script code
20   *
21   * <p>
22   * The code returned by the get*Script methods will be wrapped in the
23   * appropriate event registration code, therefore only the body needs to be
24   * returned
25   * </p>
26   *
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public interface ScriptEventSupport {
30  
31      /**
32       * Script that should be executed when the component's onLoad event is fired
33       *
34       * @return String JavaScript code
35       */
36      public String getOnLoadScript();
37  
38      /**
39       * Script that should be executed when the component's onLoad event is fired
40       *
41       * @param onLoadScript JavaScript code
42       */
43      public void setOnLoadScript(String onLoadScript);
44  
45      /**
46       * Script to be run when the document ready event is triggered
47       *
48       * @return the onDocumentReadyScript
49       */
50      public String getOnDocumentReadyScript();
51  
52      /**
53       * Setter for the components onDocumentReady script
54       *
55       * @param onDocumentReadyScript
56       */
57      public void setOnDocumentReadyScript(String onDocumentReadyScript);
58  
59      /**
60       * Script that should be executed when the component's onUnload event is
61       * fired
62       *
63       * @return String JavaScript code
64       */
65      public String getOnUnloadScript();
66  
67      /**
68       * Setter for the components onUnload script
69       *
70       * @param onUnloadScript
71       */
72      public void setOnUnloadScript(String onUnloadScript);
73  
74      /**
75       * Script that should be executed when the component's onClose event is
76       * fired
77       *
78       * @return String JavaScript code
79       */
80      public String getOnCloseScript();
81  
82      /**
83       * Setter for the components onClose script
84       *
85       * @param onCloseScript
86       */
87      public void setOnCloseScript(String onCloseScript);
88  
89      /**
90       * Script that should be executed when the component's onBlur event is fired
91       *
92       * @return String JavaScript code
93       */
94      public String getOnBlurScript();
95  
96      /**
97       * Script that should be executed when the component's onBlur event is fired
98       *
99       * @param onBlurScript JavaScript code
100      */
101     public void setOnBlurScript(String onBlurScript);
102 
103     /**
104      * Script that should be executed when the component's onChange event is
105      * fired
106      *
107      * @return String JavaScript code
108      */
109     public String getOnChangeScript();
110 
111     /**
112      * Setter for the components onChange script
113      *
114      * @param onChangeScript
115      */
116     public void setOnChangeScript(String onChangeScript);
117 
118     /**
119      * Script that should be executed when the component's onClick event is
120      * fired
121      *
122      * @return String JavaScript code
123      */
124     public String getOnClickScript();
125 
126     /**
127      * Setter for the components onClick script
128      *
129      * @param onClickScript
130      */
131     public void setOnClickScript(String onClickScript);
132 
133     /**
134      * Script that should be executed when the component's onDblClick event is
135      * fired
136      *
137      * @return String JavaScript code
138      */
139     public String getOnDblClickScript();
140 
141     /**
142      * Setter for the components onDblClick script
143      *
144      * @param onDblClickScript
145      */
146     public void setOnDblClickScript(String onDblClickScript);
147 
148     /**
149      * Script that should be executed when the component's onFocus event is
150      * fired
151      *
152      * @return String JavaScript code
153      */
154     public String getOnFocusScript();
155 
156     /**
157      * Setter for the components onFocus script
158      *
159      * @param onFocusScript
160      */
161     public void setOnFocusScript(String onFocusScript);
162 
163     /**
164      * Script that should be executed when the component's onSubmit event is
165      * fired
166      *
167      * @return String JavaScript code
168      */
169     public String getOnSubmitScript();
170 
171     /**
172      * Setter for the components onSubmit script
173      *
174      * @param onSubmitScript
175      */
176     public void setOnSubmitScript(String onSubmitScript);
177 
178     /**
179      * Script that should be executed when the component's onInput event is
180      * fired
181      *
182      * <p>This differs from key press/up or change in that it will catch autocomplete, cut, and paste mouse actions
183      * on an input.</p>
184      *
185      * @return String JavaScript code
186      */
187     public String getOnInputScript();
188 
189     /**
190      * Setter for the components onInput script
191      *
192      * @param onInputScript
193      */
194     public void setOnInputScript(String onInputScript);
195 
196     /**
197      * Script that should be executed when the component's onKeyPress event is
198      * fired
199      *
200      * @return String JavaScript code
201      */
202     public String getOnKeyPressScript();
203 
204     /**
205      * Setter for the components onKeyPress script
206      *
207      * @param onKeyPressScript
208      */
209     public void setOnKeyPressScript(String onKeyPressScript);
210 
211     /**
212      * Script that should be executed when the component's onKeyUp event is
213      * fired
214      *
215      * @return String JavaScript code
216      */
217     public String getOnKeyUpScript();
218 
219     /**
220      * Setter for the components onKeyUp script
221      *
222      * @param onKeyUpScript
223      */
224     public void setOnKeyUpScript(String onKeyUpScript);
225 
226     /**
227      * Script that should be executed when the component's onKeyDown event is
228      * fired
229      *
230      * @return String JavaScript code
231      */
232     public String getOnKeyDownScript();
233 
234     /**
235      * Setter for the components onKeyDown script
236      *
237      * @param onKeyDownScript
238      */
239     public void setOnKeyDownScript(String onKeyDownScript);
240 
241     /**
242      * Script that should be executed when the component's onMouseOver event is
243      * fired
244      *
245      * @return String JavaScript code
246      */
247     public String getOnMouseOverScript();
248 
249     /**
250      * Setter for the components onMouseOver script
251      *
252      * @param onMouseOverScript
253      */
254     public void setOnMouseOverScript(String onMouseOverScript);
255 
256     /**
257      * Script that should be executed when the component's onMouseOut event is
258      * fired
259      *
260      * @return String JavaScript code
261      */
262     public String getOnMouseOutScript();
263 
264     /**
265      * Setter for the components onMouseOut script
266      *
267      * @param onMouseOutScript
268      */
269     public void setOnMouseOutScript(String onMouseOutScript);
270 
271     /**
272      * Script that should be executed when the component's onMouseUp event is
273      * fired
274      *
275      * @return String JavaScript code
276      */
277     public String getOnMouseUpScript();
278 
279     /**
280      * Setter for the components onMouseUp script
281      *
282      * @param onMouseUpScript
283      */
284     public void setOnMouseUpScript(String onMouseUpScript);
285 
286     /**
287      * Script that should be executed when the component's onMouseDown event is
288      * fired
289      *
290      * @return String JavaScript code
291      */
292     public String getOnMouseDownScript();
293 
294     /**
295      * Setter for the components onMouseDown script
296      *
297      * @param onMouseDownScript
298      */
299     public void setOnMouseDownScript(String onMouseDownScript);
300 
301     /**
302      * Script that should be executed when the component's onMouseMove event is
303      * fired
304      *
305      * @return String JavaScript code
306      */
307     public String getOnMouseMoveScript();
308 
309     /**
310      * Setter for the components onMouseMove script
311      *
312      * @param onMouseMoveScript
313      */
314     public void setOnMouseMoveScript(String onMouseMoveScript);
315 
316 }