1 16 package org.directwebremoting.proxy.scriptaculous; 17 18 import java.util.Collection ; 19 20 import org.directwebremoting.ScriptBuffer; 21 import org.directwebremoting.ScriptSession; 22 import org.directwebremoting.proxy.ScriptProxy; 23 24 29 public class Effect extends ScriptProxy 30 { 31 36 public Effect() 37 { 38 super(); 39 } 40 41 45 public Effect(ScriptSession scriptSession) 46 { 47 super(scriptSession); 48 } 49 50 54 public Effect(Collection scriptSessions) 55 { 56 super(scriptSessions); 57 } 58 59 63 public void fade(String elementId) 64 { 65 callEffect(elementId, "Fade"); 66 } 67 68 72 public void appear(String elementId) 73 { 74 callEffect(elementId, "Appear"); 75 } 76 77 81 public void puff(String elementId) 82 { 83 callEffect(elementId, "Puff"); 84 } 85 86 90 public void blindUp(String elementId) 91 { 92 callEffect(elementId, "BlindUp"); 93 } 94 95 99 public void blindDown(String elementId) 100 { 101 callEffect(elementId, "BlindDown"); 102 } 103 104 108 public void switchOff(String elementId) 109 { 110 callEffect(elementId, "SwitchOff"); 111 } 112 113 117 public void dropOut(String elementId) 118 { 119 callEffect(elementId, "DropOut"); 120 } 121 122 126 public void shake(String elementId) 127 { 128 callEffect(elementId, "Shake"); 129 } 130 131 135 public void slideDown(String elementId) 136 { 137 callEffect(elementId, "SlideDown"); 138 } 139 140 144 public void slideUp(String elementId) 145 { 146 callEffect(elementId, "SlideUp"); 147 } 148 149 153 public void squish(String elementId) 154 { 155 callEffect(elementId, "Squish"); 156 } 157 158 162 public void grow(String elementId) 163 { 164 callEffect(elementId, "Grow"); 165 } 166 167 171 public void shrink(String elementId) 172 { 173 callEffect(elementId, "Shrink"); 174 } 175 176 180 public void pulsate(String elementId) 181 { 182 callEffect(elementId, "Pulsate"); 183 } 184 185 189 public void fold(String elementId) 190 { 191 callEffect(elementId, "Fold"); 192 } 193 194 198 public void highlight(String elementId) 199 { 200 callEffect(elementId, "Highlight"); 201 } 202 203 208 public void highlight(String elementId, String options) 209 { 210 callEffect(elementId, "Highlight", options); 211 } 212 213 218 public void fade(String elementId, String options) 219 { 220 callEffect(elementId, "Fade", options); 221 } 222 223 228 public void appear(String elementId, String options) 229 { 230 callEffect(elementId, "Appear", options); 231 } 232 233 238 public void puff(String elementId, String options) 239 { 240 callEffect(elementId, "Puff", options); 241 } 242 243 248 public void blindUp(String elementId, String options) 249 { 250 callEffect(elementId, "BlindUp", options); 251 } 252 253 258 public void blindDown(String elementId, String options) 259 { 260 callEffect(elementId, "BlindDown", options); 261 } 262 263 268 public void switchOff(String elementId, String options) 269 { 270 callEffect(elementId, "SwitchOff", options); 271 } 272 273 278 public void dropOut(String elementId, String options) 279 { 280 callEffect(elementId, "DropOut", options); 281 } 282 283 288 public void shake(String elementId, String options) 289 { 290 callEffect(elementId, "Shake", options); 291 } 292 293 298 public void slideDown(String elementId, String options) 299 { 300 callEffect(elementId, "SlideDown", options); 301 } 302 303 308 public void slideUp(String elementId, String options) 309 { 310 callEffect(elementId, "SlideUp", options); 311 } 312 313 318 public void squish(String elementId, String options) 319 { 320 callEffect(elementId, "Squish", options); 321 } 322 323 328 public void grow(String elementId, String options) 329 { 330 callEffect(elementId, "Grow", options); 331 } 332 333 338 public void shrink(String elementId, String options) 339 { 340 callEffect(elementId, "Shrink", options); 341 } 342 343 348 public void pulsate(String elementId, String options) 349 { 350 callEffect(elementId, "Pulsate", options); 351 } 352 353 358 public void fold(String elementId, String options) 359 { 360 callEffect(elementId, "Fold", options); 361 } 362 363 367 private void callEffect(String elementId, String function) 368 { 369 callEffect(elementId, function, null); 370 } 371 372 377 private void callEffect(String elementId, String function, String options) 378 { 379 ScriptBuffer script = new ScriptBuffer(); 380 script.appendScript("new Effect.").appendScript(function).appendScript("('").appendScript(elementId).appendScript("'"); 381 if (options != null && options.length() > 0) 382 { 383 script.appendScript(", ").appendScript(options); 384 } 385 script.appendScript(");"); 386 addScript(script); 387 } 388 } 389 | Popular Tags |