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       * @return String 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       * @return String 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 onKeyPress event is
180 	 * fired
181 	 *
182 	 * @return String JavaScript code
183 	 */
184 	public String getOnKeyPressScript();
185 
186     /**
187      * Setter for the components onKeyPress script
188      *
189      * @param onKeyPressScript
190      */
191     public void setOnKeyPressScript(String onKeyPressScript);
192 
193 	/**
194 	 * Script that should be executed when the component's onKeyUp event is
195 	 * fired
196 	 *
197 	 * @return String JavaScript code
198 	 */
199 	public String getOnKeyUpScript();
200 
201     /**
202      * Setter for the components onKeyUp script
203      *
204      * @param onKeyUpScript
205      */
206     public void setOnKeyUpScript(String onKeyUpScript);
207 
208 	/**
209 	 * Script that should be executed when the component's onKeyDown event is
210 	 * fired
211 	 *
212 	 * @return String JavaScript code
213 	 */
214 	public String getOnKeyDownScript();
215 
216     /**
217      * Setter for the components onKeyDown script
218      *
219      * @param onKeyDownScript
220      */
221     public void setOnKeyDownScript(String onKeyDownScript);
222 
223 	/**
224 	 * Script that should be executed when the component's onMouseOver event is
225 	 * fired
226 	 *
227 	 * @return String JavaScript code
228 	 */
229 	public String getOnMouseOverScript();
230 
231     /**
232      * Setter for the components onMouseOver script
233      *
234      * @param onMouseOverScript
235      */
236     public void setOnMouseOverScript(String onMouseOverScript);
237 
238 	/**
239 	 * Script that should be executed when the component's onMouseOut event is
240 	 * fired
241 	 *
242 	 * @return String JavaScript code
243 	 */
244 	public String getOnMouseOutScript();
245 
246     /**
247      * Setter for the components onMouseOut script
248      *
249      * @param onMouseOutScript
250      */
251     public void setOnMouseOutScript(String onMouseOutScript);
252 
253 	/**
254 	 * Script that should be executed when the component's onMouseUp event is
255 	 * fired
256 	 *
257 	 * @return String JavaScript code
258 	 */
259 	public String getOnMouseUpScript();
260 
261     /**
262      * Setter for the components onMouseUp script
263      *
264      * @param onMouseUpScript
265      */
266     public void setOnMouseUpScript(String onMouseUpScript);
267 
268 	/**
269 	 * Script that should be executed when the component's onMouseDown event is
270 	 * fired
271 	 *
272 	 * @return String JavaScript code
273 	 */
274 	public String getOnMouseDownScript();
275 
276     /**
277      * Setter for the components onMouseDown script
278      *
279      * @param onMouseDownScript
280      */
281     public void setOnMouseDownScript(String onMouseDownScript);
282 
283 	/**
284 	 * Script that should be executed when the component's onMouseMove event is
285 	 * fired
286 	 *
287 	 * @return String JavaScript code
288 	 */
289 	public String getOnMouseMoveScript();
290 
291     /**
292      * Setter for the components onMouseMove script
293      *
294      * @param onMouseMoveScript
295      */
296     public void setOnMouseMoveScript(String onMouseMoveScript);
297 
298 }