| 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 | * Indicates whether the component supports the onChange event | |
| 111 | * | |
| 112 | * @return boolean true if event is supported, false if the event is not | |
| 113 | * supported | |
| 114 | */ | |
| 115 | public boolean getSupportsOnChange(); | |
| 116 | ||
| 117 | /** | |
| 118 | * Script that should be executed when the component's onChange event is | |
| 119 | * fired | |
| 120 | * | |
| 121 | * @return String JavaScript code | |
| 122 | */ | |
| 123 | public String getOnChangeScript(); | |
| 124 | ||
| 125 | /** | |
| 126 | * Indicates whether the component supports the onClick event | |
| 127 | * | |
| 128 | * @return boolean true if event is supported, false if the event is not | |
| 129 | * supported | |
| 130 | */ | |
| 131 | public boolean getSupportsOnClick(); | |
| 132 | ||
| 133 | /** | |
| 134 | * Script that should be executed when the component's onClick event is | |
| 135 | * fired | |
| 136 | * | |
| 137 | * @return String JavaScript code | |
| 138 | */ | |
| 139 | public String getOnClickScript(); | |
| 140 | ||
| 141 | /** | |
| 142 | * Indicates whether the component supports the onDblClick event | |
| 143 | * | |
| 144 | * @return boolean true if event is supported, false if the event is not | |
| 145 | * supported | |
| 146 | */ | |
| 147 | public boolean getSupportsOnDblClick(); | |
| 148 | ||
| 149 | /** | |
| 150 | * Script that should be executed when the component's onDblClick event is | |
| 151 | * fired | |
| 152 | * | |
| 153 | * @return String JavaScript code | |
| 154 | */ | |
| 155 | public String getOnDblClickScript(); | |
| 156 | ||
| 157 | /** | |
| 158 | * Indicates whether the component supports the onFocus event | |
| 159 | * | |
| 160 | * @return boolean true if event is supported, false if the event is not | |
| 161 | * supported | |
| 162 | */ | |
| 163 | public boolean getSupportsOnFocus(); | |
| 164 | ||
| 165 | /** | |
| 166 | * Script that should be executed when the component's onFocus event is | |
| 167 | * fired | |
| 168 | * | |
| 169 | * @return String JavaScript code | |
| 170 | */ | |
| 171 | public String getOnFocusScript(); | |
| 172 | ||
| 173 | /** | |
| 174 | * Indicates whether the component supports the onSubmit event | |
| 175 | * | |
| 176 | * @return boolean true if event is supported, false if the event is not | |
| 177 | * supported | |
| 178 | */ | |
| 179 | public boolean getSupportsOnSubmit(); | |
| 180 | ||
| 181 | /** | |
| 182 | * Script that should be executed when the component's onSubmit event is | |
| 183 | * fired | |
| 184 | * | |
| 185 | * @return String JavaScript code | |
| 186 | */ | |
| 187 | public String getOnSubmitScript(); | |
| 188 | ||
| 189 | /** | |
| 190 | * Indicates whether the component supports the onKeyPress event | |
| 191 | * | |
| 192 | * @return boolean true if event is supported, false if the event is not | |
| 193 | * supported | |
| 194 | */ | |
| 195 | public boolean getSupportsOnKeyPress(); | |
| 196 | ||
| 197 | /** | |
| 198 | * Script that should be executed when the component's onKeyPress event is | |
| 199 | * fired | |
| 200 | * | |
| 201 | * @return String JavaScript code | |
| 202 | */ | |
| 203 | public String getOnKeyPressScript(); | |
| 204 | ||
| 205 | /** | |
| 206 | * Indicates whether the component supports the onKeyUp event | |
| 207 | * | |
| 208 | * @return boolean true if event is supported, false if the event is not | |
| 209 | * supported | |
| 210 | */ | |
| 211 | public boolean getSupportsOnKeyUp(); | |
| 212 | ||
| 213 | /** | |
| 214 | * Script that should be executed when the component's onKeyUp event is | |
| 215 | * fired | |
| 216 | * | |
| 217 | * @return String JavaScript code | |
| 218 | */ | |
| 219 | public String getOnKeyUpScript(); | |
| 220 | ||
| 221 | /** | |
| 222 | * Indicates whether the component supports the onKeyDown event | |
| 223 | * | |
| 224 | * @return boolean true if event is supported, false if the event is not | |
| 225 | * supported | |
| 226 | */ | |
| 227 | public boolean getSupportsOnKeyDown(); | |
| 228 | ||
| 229 | /** | |
| 230 | * Script that should be executed when the component's onKeyDown event is | |
| 231 | * fired | |
| 232 | * | |
| 233 | * @return String JavaScript code | |
| 234 | */ | |
| 235 | public String getOnKeyDownScript(); | |
| 236 | ||
| 237 | /** | |
| 238 | * Indicates whether the component supports the onMouseOver event | |
| 239 | * | |
| 240 | * @return boolean true if event is supported, false if the event is not | |
| 241 | * supported | |
| 242 | */ | |
| 243 | public boolean getSupportsOnMouseOver(); | |
| 244 | ||
| 245 | /** | |
| 246 | * Script that should be executed when the component's onMouseOver event is | |
| 247 | * fired | |
| 248 | * | |
| 249 | * @return String JavaScript code | |
| 250 | */ | |
| 251 | public String getOnMouseOverScript(); | |
| 252 | ||
| 253 | /** | |
| 254 | * Indicates whether the component supports the onMouseOut event | |
| 255 | * | |
| 256 | * @return boolean true if event is supported, false if the event is not | |
| 257 | * supported | |
| 258 | */ | |
| 259 | public boolean getSupportsOnMouseOut(); | |
| 260 | ||
| 261 | /** | |
| 262 | * Script that should be executed when the component's onMouseOut event is | |
| 263 | * fired | |
| 264 | * | |
| 265 | * @return String JavaScript code | |
| 266 | */ | |
| 267 | public String getOnMouseOutScript(); | |
| 268 | ||
| 269 | /** | |
| 270 | * Indicates whether the component supports the onMouseUp event | |
| 271 | * | |
| 272 | * @return boolean true if event is supported, false if the event is not | |
| 273 | * supported | |
| 274 | */ | |
| 275 | public boolean getSupportsOnMouseUp(); | |
| 276 | ||
| 277 | /** | |
| 278 | * Script that should be executed when the component's onMouseUp event is | |
| 279 | * fired | |
| 280 | * | |
| 281 | * @return String JavaScript code | |
| 282 | */ | |
| 283 | public String getOnMouseUpScript(); | |
| 284 | ||
| 285 | /** | |
| 286 | * Indicates whether the component supports the onMouseDown event | |
| 287 | * | |
| 288 | * @return boolean true if event is supported, false if the event is not | |
| 289 | * supported | |
| 290 | */ | |
| 291 | public boolean getSupportsOnMouseDown(); | |
| 292 | ||
| 293 | /** | |
| 294 | * Script that should be executed when the component's onMouseDown event is | |
| 295 | * fired | |
| 296 | * | |
| 297 | * @return String JavaScript code | |
| 298 | */ | |
| 299 | public String getOnMouseDownScript(); | |
| 300 | ||
| 301 | /** | |
| 302 | * Indicates whether the component supports the onMouseMove event | |
| 303 | * | |
| 304 | * @return boolean true if event is supported, false if the event is not | |
| 305 | * supported | |
| 306 | */ | |
| 307 | public boolean getSupportsOnMouseMove(); | |
| 308 | ||
| 309 | /** | |
| 310 | * Script that should be executed when the component's onMouseMove event is | |
| 311 | * fired | |
| 312 | * | |
| 313 | * @return String JavaScript code | |
| 314 | */ | |
| 315 | public String getOnMouseMoveScript(); | |
| 316 | ||
| 317 | } |