001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.uif.component;
017
018/**
019 * Declares methods for retrieving the event script code
020 *
021 * <p>
022 * The code returned by the get*Script methods will be wrapped in the
023 * appropriate event registration code, therefore only the body needs to be
024 * returned
025 * </p>
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029public interface ScriptEventSupport {
030
031    /**
032     * Script that should be executed when the component's onLoad event is fired
033     *
034     * @return String JavaScript code
035     */
036    public String getOnLoadScript();
037
038    /**
039     * Script that should be executed when the component's onLoad event is fired
040     *
041     * @param onLoadScript JavaScript code
042     */
043    public void setOnLoadScript(String onLoadScript);
044
045    /**
046     * Script to be run when the document ready event is triggered
047     *
048     * @return the onDocumentReadyScript
049     */
050    public String getOnDocumentReadyScript();
051
052    /**
053     * Setter for the components onDocumentReady script
054     *
055     * @param onDocumentReadyScript
056     */
057    public void setOnDocumentReadyScript(String onDocumentReadyScript);
058
059    /**
060     * Script that should be executed when the component's onUnload event is
061     * fired
062     *
063     * @return String JavaScript code
064     */
065    public String getOnUnloadScript();
066
067    /**
068     * Setter for the components onUnload script
069     *
070     * @param onUnloadScript
071     */
072    public void setOnUnloadScript(String onUnloadScript);
073
074    /**
075     * Script that should be executed when the component's onClose event is
076     * fired
077     *
078     * @return String JavaScript code
079     */
080    public String getOnCloseScript();
081
082    /**
083     * Setter for the components onClose script
084     *
085     * @param onCloseScript
086     */
087    public void setOnCloseScript(String onCloseScript);
088
089    /**
090     * Script that should be executed when the component's onBlur event is fired
091     *
092     * @return String JavaScript code
093     */
094    public String getOnBlurScript();
095
096    /**
097     * Script that should be executed when the component's onBlur event is fired
098     *
099     * @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}