View Javadoc

1   /*
2    * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
3    * 
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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  
17  package org.gwtwidgets.client.wrap;
18  
19  /***
20   * <p>
21   * Effect options parametrise a scriptaculous effect, for available effects and options please
22   * consult the <a href="http://wiki.script.aculo.us/scriptaculous/tags/effects">scriptaculous wiki</a>.
23   * </p>
24   * <p>
25   * You can also register callbacks which observe an effect's progress, for an example see {@link Effect}.
26   * </p>
27   * 
28   * @author rhanson
29   * @author george georgovassilis
30   *
31   */
32  public class EffectOption
33  {
34      private String name;
35      private Object value;
36  
37      
38      public EffectOption (String name, String value)
39      {
40          this.name = name;
41          this.value = value;
42      }
43  
44      public EffectOption (String name, double value)
45      {
46          this.name = name;
47          this.value = Double.toString(value);
48      }
49  
50      public EffectOption (String name, Callback callback)
51          {
52              this.name = name;
53              this.value = callback;
54          }
55  
56      
57      public String getName ()
58      {
59          return name;
60      }
61  
62      public Object getValue ()
63      {
64          return value;
65      }
66  
67  }
68