| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ScriptEventSupport | 
  | 
  | 1.0;1 | 
| 1 |  /* | |
| 2 |   * Copyright 2011 The Kuali Foundation | |
| 3 |   * | |
| 4 |   * Licensed under the Educational Community License, Version 1.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/ecl1.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.kns.uif.core; | |
| 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 |           * Indicates whether the component supports the document ready event | |
| 49 |           *  | |
| 50 |           * @return boolean true if event is supported, false if the event is not | |
| 51 |           *         supported | |
| 52 |           */ | |
| 53 | public boolean getSupportsOnDocumentReady();  | |
| 54 | ||
| 55 |          /** | |
| 56 |           * Script to be run when the document ready event is triggered | |
| 57 |           *  | |
| 58 |           * @return the onDocumentReadyScript | |
| 59 |           */ | |
| 60 |          public String getOnDocumentReadyScript(); | |
| 61 | ||
| 62 |          /** | |
| 63 |           * Indicates whether the component supports the onUnload event | |
| 64 |           *  | |
| 65 |           * @return boolean true if event is supported, false if the event is not | |
| 66 |           *         supported | |
| 67 |           */ | |
| 68 | public boolean getSupportsOnUnload();  | |
| 69 | ||
| 70 |          /** | |
| 71 |           * Script that should be executed when the component's onUnload event is | |
| 72 |           * fired | |
| 73 |           *  | |
| 74 |           * @return String JavaScript code | |
| 75 |           */ | |
| 76 |          public String getOnUnloadScript(); | |
| 77 | ||
| 78 |          /** | |
| 79 |           * Indicates whether the component supports the onClose event | |
| 80 |           *  | |
| 81 |           * @return boolean true if event is supported, false if the event is not | |
| 82 |           *         supported | |
| 83 |           */ | |
| 84 | public boolean getSupportsOnClose();  | |
| 85 | ||
| 86 |          /** | |
| 87 |           * Script that should be executed when the component's onClose event is | |
| 88 |           * fired | |
| 89 |           *  | |
| 90 |           * @return String JavaScript code | |
| 91 |           */ | |
| 92 |          public String getOnCloseScript(); | |
| 93 | ||
| 94 |          /** | |
| 95 |           * Indicates whether the component supports the onBlur event | |
| 96 |           *  | |
| 97 |           * @return boolean true if event is supported, false if the event is not | |
| 98 |           *         supported | |
| 99 |           */ | |
| 100 | public boolean getSupportsOnBlur();  | |
| 101 | ||
| 102 |          /** | |
| 103 |           * Script that should be executed when the component's onBlur event is fired | |
| 104 |           *  | |
| 105 |           * @return String JavaScript code | |
| 106 |           */ | |
| 107 |          public String getOnBlurScript(); | |
| 108 | ||
| 109 |      /** | |
| 110 |       * Setter for the onblur script | |
| 111 |       * | |
| 112 |       * @param script | |
| 113 |       */ | |
| 114 | public void setOnBlurScript(String script);  | |
| 115 | ||
| 116 |          /** | |
| 117 |           * Indicates whether the component supports the onChange event | |
| 118 |           *  | |
| 119 |           * @return boolean true if event is supported, false if the event is not | |
| 120 |           *         supported | |
| 121 |           */ | |
| 122 | public boolean getSupportsOnChange();  | |
| 123 | ||
| 124 |          /** | |
| 125 |           * Script that should be executed when the component's onChange event is | |
| 126 |           * fired | |
| 127 |           *  | |
| 128 |           * @return String JavaScript code | |
| 129 |           */ | |
| 130 |          public String getOnChangeScript(); | |
| 131 | ||
| 132 |          /** | |
| 133 |           * Indicates whether the component supports the onClick event | |
| 134 |           *  | |
| 135 |           * @return boolean true if event is supported, false if the event is not | |
| 136 |           *         supported | |
| 137 |           */ | |
| 138 | public boolean getSupportsOnClick();  | |
| 139 | ||
| 140 |          /** | |
| 141 |           * Script that should be executed when the component's onClick event is | |
| 142 |           * fired | |
| 143 |           *  | |
| 144 |           * @return String JavaScript code | |
| 145 |           */ | |
| 146 |          public String getOnClickScript(); | |
| 147 | ||
| 148 |          /** | |
| 149 |           * Indicates whether the component supports the onDblClick event | |
| 150 |           *  | |
| 151 |           * @return boolean true if event is supported, false if the event is not | |
| 152 |           *         supported | |
| 153 |           */ | |
| 154 | public boolean getSupportsOnDblClick();  | |
| 155 | ||
| 156 |          /** | |
| 157 |           * Script that should be executed when the component's onDblClick event is | |
| 158 |           * fired | |
| 159 |           *  | |
| 160 |           * @return String JavaScript code | |
| 161 |           */ | |
| 162 |          public String getOnDblClickScript(); | |
| 163 | ||
| 164 |          /** | |
| 165 |           * Indicates whether the component supports the onFocus event | |
| 166 |           *  | |
| 167 |           * @return boolean true if event is supported, false if the event is not | |
| 168 |           *         supported | |
| 169 |           */ | |
| 170 | public boolean getSupportsOnFocus();  | |
| 171 | ||
| 172 |          /** | |
| 173 |           * Script that should be executed when the component's onFocus event is | |
| 174 |           * fired | |
| 175 |           *  | |
| 176 |           * @return String JavaScript code | |
| 177 |           */ | |
| 178 |          public String getOnFocusScript(); | |
| 179 | ||
| 180 |          /** | |
| 181 |           * Indicates whether the component supports the onSubmit event | |
| 182 |           *  | |
| 183 |           * @return boolean true if event is supported, false if the event is not | |
| 184 |           *         supported | |
| 185 |           */ | |
| 186 | public boolean getSupportsOnSubmit();  | |
| 187 | ||
| 188 |          /** | |
| 189 |           * Script that should be executed when the component's onSubmit event is | |
| 190 |           * fired | |
| 191 |           *  | |
| 192 |           * @return String JavaScript code | |
| 193 |           */ | |
| 194 |          public String getOnSubmitScript(); | |
| 195 | ||
| 196 |          /** | |
| 197 |           * Indicates whether the component supports the onKeyPress event | |
| 198 |           *  | |
| 199 |           * @return boolean true if event is supported, false if the event is not | |
| 200 |           *         supported | |
| 201 |           */ | |
| 202 | public boolean getSupportsOnKeyPress();  | |
| 203 | ||
| 204 |          /** | |
| 205 |           * Script that should be executed when the component's onKeyPress event is | |
| 206 |           * fired | |
| 207 |           *  | |
| 208 |           * @return String JavaScript code | |
| 209 |           */ | |
| 210 |          public String getOnKeyPressScript(); | |
| 211 | ||
| 212 |          /** | |
| 213 |           * Indicates whether the component supports the onKeyUp event | |
| 214 |           *  | |
| 215 |           * @return boolean true if event is supported, false if the event is not | |
| 216 |           *         supported | |
| 217 |           */ | |
| 218 | public boolean getSupportsOnKeyUp();  | |
| 219 | ||
| 220 |          /** | |
| 221 |           * Script that should be executed when the component's onKeyUp event is | |
| 222 |           * fired | |
| 223 |           *  | |
| 224 |           * @return String JavaScript code | |
| 225 |           */ | |
| 226 |          public String getOnKeyUpScript(); | |
| 227 | ||
| 228 |          /** | |
| 229 |           * Indicates whether the component supports the onKeyDown event | |
| 230 |           *  | |
| 231 |           * @return boolean true if event is supported, false if the event is not | |
| 232 |           *         supported | |
| 233 |           */ | |
| 234 | public boolean getSupportsOnKeyDown();  | |
| 235 | ||
| 236 |          /** | |
| 237 |           * Script that should be executed when the component's onKeyDown event is | |
| 238 |           * fired | |
| 239 |           *  | |
| 240 |           * @return String JavaScript code | |
| 241 |           */ | |
| 242 |          public String getOnKeyDownScript(); | |
| 243 | ||
| 244 |          /** | |
| 245 |           * Indicates whether the component supports the onMouseOver event | |
| 246 |           *  | |
| 247 |           * @return boolean true if event is supported, false if the event is not | |
| 248 |           *         supported | |
| 249 |           */ | |
| 250 | public boolean getSupportsOnMouseOver();  | |
| 251 | ||
| 252 |          /** | |
| 253 |           * Script that should be executed when the component's onMouseOver event is | |
| 254 |           * fired | |
| 255 |           *  | |
| 256 |           * @return String JavaScript code | |
| 257 |           */ | |
| 258 |          public String getOnMouseOverScript(); | |
| 259 | ||
| 260 |          /** | |
| 261 |           * Indicates whether the component supports the onMouseOut event | |
| 262 |           *  | |
| 263 |           * @return boolean true if event is supported, false if the event is not | |
| 264 |           *         supported | |
| 265 |           */ | |
| 266 | public boolean getSupportsOnMouseOut();  | |
| 267 | ||
| 268 |          /** | |
| 269 |           * Script that should be executed when the component's onMouseOut event is | |
| 270 |           * fired | |
| 271 |           *  | |
| 272 |           * @return String JavaScript code | |
| 273 |           */ | |
| 274 |          public String getOnMouseOutScript(); | |
| 275 | ||
| 276 |          /** | |
| 277 |           * Indicates whether the component supports the onMouseUp event | |
| 278 |           *  | |
| 279 |           * @return boolean true if event is supported, false if the event is not | |
| 280 |           *         supported | |
| 281 |           */ | |
| 282 | public boolean getSupportsOnMouseUp();  | |
| 283 | ||
| 284 |          /** | |
| 285 |           * Script that should be executed when the component's onMouseUp event is | |
| 286 |           * fired | |
| 287 |           *  | |
| 288 |           * @return String JavaScript code | |
| 289 |           */ | |
| 290 |          public String getOnMouseUpScript(); | |
| 291 | ||
| 292 |          /** | |
| 293 |           * Indicates whether the component supports the onMouseDown event | |
| 294 |           *  | |
| 295 |           * @return boolean true if event is supported, false if the event is not | |
| 296 |           *         supported | |
| 297 |           */ | |
| 298 | public boolean getSupportsOnMouseDown();  | |
| 299 | ||
| 300 |          /** | |
| 301 |           * Script that should be executed when the component's onMouseDown event is | |
| 302 |           * fired | |
| 303 |           *  | |
| 304 |           * @return String JavaScript code | |
| 305 |           */ | |
| 306 |          public String getOnMouseDownScript(); | |
| 307 | ||
| 308 |          /** | |
| 309 |           * Indicates whether the component supports the onMouseMove event | |
| 310 |           *  | |
| 311 |           * @return boolean true if event is supported, false if the event is not | |
| 312 |           *         supported | |
| 313 |           */ | |
| 314 | public boolean getSupportsOnMouseMove();  | |
| 315 | ||
| 316 |          /** | |
| 317 |           * Script that should be executed when the component's onMouseMove event is | |
| 318 |           * fired | |
| 319 |           *  | |
| 320 |           * @return String JavaScript code | |
| 321 |           */ | |
| 322 |          public String getOnMouseMoveScript(); | |
| 323 | ||
| 324 | }  |