View Javadoc

1   /**
2    * Copyright 2005-2012 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 determining which client side events are supported by a
20   * <code>Component</code> and methods for retrieving the event code
21   * 
22   * <p>
23   * The code returned by the get*Script methods will be wrapped in the
24   * appropriate event registration code, therefore only the body needs to be
25   * returned
26   * </p>
27   * 
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public interface ScriptEventSupport {
31  
32  	/**
33  	 * Indicates whether the component supports the onLoad event
34  	 * 
35  	 * @return boolean true if event is supported, false if the event is not
36  	 *         supported
37  	 */
38  	public boolean getSupportsOnLoad();
39  
40  	/**
41  	 * Script that should be executed when the component's onLoad event is fired
42  	 * 
43  	 * @return String JavaScript code
44  	 */
45  	public String getOnLoadScript();
46  
47      /**
48       * Setter for the onLoad script
49       *
50       * @param script - script for on load
51       */
52      public void setOnLoadScript(String script);
53  
54  	/**
55  	 * Indicates whether the component supports the document ready event
56  	 * 
57  	 * @return boolean true if event is supported, false if the event is not
58  	 *         supported
59  	 */
60  	public boolean getSupportsOnDocumentReady();
61  
62      /**
63       * Setter for the onDocumentReadyScript
64       *
65       * @param script - script for onDocumentReadyScript
66       */
67      public void setOnDocumentReadyScript(String script);
68  
69  	/**
70  	 * Script to be run when the document ready event is triggered
71  	 * 
72  	 * @return the onDocumentReadyScript
73  	 */
74  	public String getOnDocumentReadyScript();
75  
76  	/**
77  	 * Indicates whether the component supports the onUnload event
78  	 * 
79  	 * @return boolean true if event is supported, false if the event is not
80  	 *         supported
81  	 */
82  	public boolean getSupportsOnUnload();
83  
84  	/**
85  	 * Script that should be executed when the component's onUnload event is
86  	 * fired
87  	 * 
88  	 * @return String JavaScript code
89  	 */
90  	public String getOnUnloadScript();
91  
92  	/**
93  	 * Indicates whether the component supports the onClose event
94  	 * 
95  	 * @return boolean true if event is supported, false if the event is not
96  	 *         supported
97  	 */
98  	public boolean getSupportsOnClose();
99  
100 	/**
101 	 * Script that should be executed when the component's onClose event is
102 	 * fired
103 	 * 
104 	 * @return String JavaScript code
105 	 */
106 	public String getOnCloseScript();
107 
108 	/**
109 	 * Indicates whether the component supports the onBlur event
110 	 * 
111 	 * @return boolean true if event is supported, false if the event is not
112 	 *         supported
113 	 */
114 	public boolean getSupportsOnBlur();
115 
116 	/**
117 	 * Script that should be executed when the component's onBlur event is fired
118 	 * 
119 	 * @return String JavaScript code
120 	 */
121 	public String getOnBlurScript();
122 
123     /**
124      * Setter for the onblur script
125      *
126      * @param script
127      */
128     public void setOnBlurScript(String script);
129 
130 	/**
131 	 * Indicates whether the component supports the onChange event
132 	 * 
133 	 * @return boolean true if event is supported, false if the event is not
134 	 *         supported
135 	 */
136 	public boolean getSupportsOnChange();
137 
138 	/**
139 	 * Script that should be executed when the component's onChange event is
140 	 * fired
141 	 * 
142 	 * @return String JavaScript code
143 	 */
144 	public String getOnChangeScript();
145 
146 	/**
147 	 * Indicates whether the component supports the onClick event
148 	 * 
149 	 * @return boolean true if event is supported, false if the event is not
150 	 *         supported
151 	 */
152 	public boolean getSupportsOnClick();
153 
154 	/**
155 	 * Script that should be executed when the component's onClick event is
156 	 * fired
157 	 * 
158 	 * @return String JavaScript code
159 	 */
160 	public String getOnClickScript();
161 
162 	/**
163 	 * Indicates whether the component supports the onDblClick event
164 	 * 
165 	 * @return boolean true if event is supported, false if the event is not
166 	 *         supported
167 	 */
168 	public boolean getSupportsOnDblClick();
169 
170 	/**
171 	 * Script that should be executed when the component's onDblClick event is
172 	 * fired
173 	 * 
174 	 * @return String JavaScript code
175 	 */
176 	public String getOnDblClickScript();
177 
178 	/**
179 	 * Indicates whether the component supports the onFocus event
180 	 * 
181 	 * @return boolean true if event is supported, false if the event is not
182 	 *         supported
183 	 */
184 	public boolean getSupportsOnFocus();
185 
186 	/**
187 	 * Script that should be executed when the component's onFocus event is
188 	 * fired
189 	 * 
190 	 * @return String JavaScript code
191 	 */
192 	public String getOnFocusScript();
193 
194 	/**
195 	 * Indicates whether the component supports the onSubmit event
196 	 * 
197 	 * @return boolean true if event is supported, false if the event is not
198 	 *         supported
199 	 */
200 	public boolean getSupportsOnSubmit();
201 
202 	/**
203 	 * Script that should be executed when the component's onSubmit event is
204 	 * fired
205 	 * 
206 	 * @return String JavaScript code
207 	 */
208 	public String getOnSubmitScript();
209 
210 	/**
211 	 * Indicates whether the component supports the onKeyPress event
212 	 * 
213 	 * @return boolean true if event is supported, false if the event is not
214 	 *         supported
215 	 */
216 	public boolean getSupportsOnKeyPress();
217 
218 	/**
219 	 * Script that should be executed when the component's onKeyPress event is
220 	 * fired
221 	 * 
222 	 * @return String JavaScript code
223 	 */
224 	public String getOnKeyPressScript();
225 
226 	/**
227 	 * Indicates whether the component supports the onKeyUp event
228 	 * 
229 	 * @return boolean true if event is supported, false if the event is not
230 	 *         supported
231 	 */
232 	public boolean getSupportsOnKeyUp();
233 
234 	/**
235 	 * Script that should be executed when the component's onKeyUp event is
236 	 * fired
237 	 * 
238 	 * @return String JavaScript code
239 	 */
240 	public String getOnKeyUpScript();
241 
242 	/**
243 	 * Indicates whether the component supports the onKeyDown event
244 	 * 
245 	 * @return boolean true if event is supported, false if the event is not
246 	 *         supported
247 	 */
248 	public boolean getSupportsOnKeyDown();
249 
250 	/**
251 	 * Script that should be executed when the component's onKeyDown event is
252 	 * fired
253 	 * 
254 	 * @return String JavaScript code
255 	 */
256 	public String getOnKeyDownScript();
257 
258 	/**
259 	 * Indicates whether the component supports the onMouseOver event
260 	 * 
261 	 * @return boolean true if event is supported, false if the event is not
262 	 *         supported
263 	 */
264 	public boolean getSupportsOnMouseOver();
265 
266 	/**
267 	 * Script that should be executed when the component's onMouseOver event is
268 	 * fired
269 	 * 
270 	 * @return String JavaScript code
271 	 */
272 	public String getOnMouseOverScript();
273 
274 	/**
275 	 * Indicates whether the component supports the onMouseOut event
276 	 * 
277 	 * @return boolean true if event is supported, false if the event is not
278 	 *         supported
279 	 */
280 	public boolean getSupportsOnMouseOut();
281 
282 	/**
283 	 * Script that should be executed when the component's onMouseOut event is
284 	 * fired
285 	 * 
286 	 * @return String JavaScript code
287 	 */
288 	public String getOnMouseOutScript();
289 
290 	/**
291 	 * Indicates whether the component supports the onMouseUp event
292 	 * 
293 	 * @return boolean true if event is supported, false if the event is not
294 	 *         supported
295 	 */
296 	public boolean getSupportsOnMouseUp();
297 
298 	/**
299 	 * Script that should be executed when the component's onMouseUp event is
300 	 * fired
301 	 * 
302 	 * @return String JavaScript code
303 	 */
304 	public String getOnMouseUpScript();
305 
306 	/**
307 	 * Indicates whether the component supports the onMouseDown event
308 	 * 
309 	 * @return boolean true if event is supported, false if the event is not
310 	 *         supported
311 	 */
312 	public boolean getSupportsOnMouseDown();
313 
314 	/**
315 	 * Script that should be executed when the component's onMouseDown event is
316 	 * fired
317 	 * 
318 	 * @return String JavaScript code
319 	 */
320 	public String getOnMouseDownScript();
321 
322 	/**
323 	 * Indicates whether the component supports the onMouseMove event
324 	 * 
325 	 * @return boolean true if event is supported, false if the event is not
326 	 *         supported
327 	 */
328 	public boolean getSupportsOnMouseMove();
329 
330 	/**
331 	 * Script that should be executed when the component's onMouseMove event is
332 	 * fired
333 	 * 
334 	 * @return String JavaScript code
335 	 */
336 	public String getOnMouseMoveScript();
337 
338 }