Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/openwave/oui/waomelements/Card.java


1   package com.openwave.oui.waomelements;
2   import com.openwave.oui.framework.*;
3   import com.sun.java.util.collections.*;
4   
5   /**
6    * Card objects encapsulate the content of cards.<br/>
7    * Creation date: (4/4/2001 12:57:36 PM)
8    * @author: Lars Gunder Knudsen
9    */
10  public class Card extends AbsCard {
11  
12    private final static long serialVersionUID = -8840966100743911884L;
13  
14    /**
15     * Card constructor. Sets <code>waomElementName</code> = "Card"
16     * @param id Card ID
17     * @param shortTitle Card title
18     */
19    Card() {
20      super();
21      //waomElementName = "Card";
22      setWaomElementName("Card");
23    }
24  
25  
26    /**
27     * Card constructor. Sets <code>waomElementName</code> = "Card"
28     * @param id Card ID
29     * @param shortTitle Card title
30     */
31    public Card(String id, String shortTitle) {
32      super();
33      //waomElementName = "Card";
34      setWaomElementName("Card");
35      this.shortTitle = shortTitle;
36      super.setIdValue(id);
37    }
38  
39  
40  public void addDoElement(DoElement doElement) {
41    super.addElement(doElement);
42  }
43  
44  
45  public void addOnevent(Onevent onevent) {
46    this.addElement(onevent);
47  }
48  
49  
50  /**
51   * This is the short form for defining a Secondary path activity.
52   * It assumes that a URL is all you need to move on. If you need to pass along some values 
53   * to the server by means of postfields, you will need to use the addSecondaryPathTask().
54   * This method will cause navigation to be supported in the form of a hyperlink on Nokia 
55   * phones and through softkeys on UP.Browser.
56  */
57  public void addSecondaryPath(String URL, String shortName) {
58    addSecondaryPath(URL, shortName, shortName);
59  }
60  
61  
62  /**
63   * This is the short form for defining a Secondary path activity.
64   * It assumes that a URL is all you need to move on. If you need to pass along some values 
65   * to the server by means of postfields, you will need to use the addSecondaryPathTask().
66   * This method will cause navigation to be supported in the form of a hyperlink on Nokia 
67   * phones and through softkeys on UP.Browser.
68  */
69  public void addSecondaryPath(String URL, String shortName, String longName) {
70    super.addElement(
71      new PathTask(
72        PathTask.SECONDARY,
73        new Task("go", URL, "get"),
74        shortName,
75        longName));
76  
77  }
78  
79  
80  /**
81   * This is the short form for defining a Secondary path activity.
82   */
83  public void addSecondaryPathTask(AbsTask absTask, String shortName) {
84    addSecondaryPathTask(absTask, shortName, shortName);
85  }
86  
87  
88  /**
89   * This is the short form for defining a Secondary path activity.
90   */
91  public void addSecondaryPathTask(
92    AbsTask absTask,
93    String shortName,
94    String longName) {
95    super.addElement(
96      new PathTask(PathTask.SECONDARY, absTask, shortName, longName));
97  }
98  
99  
100 /**
101  * Define a side-path activity. 
102  * This method will cause navigation to be supported in the option menu on Nokia 
103  * phones and through softkeys on UP.Browser.
104  */
105 
106 public void addSidePath(String URL, String shortName) {
107   addSidePath(URL, shortName, shortName);
108 }
109 
110 
111 /**
112  * Define a side-path activity. 
113  * This method will cause navigation to be supported in the option menu on Nokia 
114  * phones and through softkeys on UP.Browser.
115  */
116 
117 public void addSidePath(String URL, String shortName, String longName) {
118   super.addElement(
119     new PathTask(PathTask.SIDE, new Task("go", URL, "get"), shortName, longName));
120 }
121 
122 
123 /**
124  * Define a side-path activity. 
125  */
126 public void addSidePathTask(AbsTask absTask, String shortName) {
127   addSidePathTask(absTask, shortName, shortName);
128 }
129 
130 
131 /**
132  * Define a side-path activity. 
133  */
134 public void addSidePathTask(
135   AbsTask absTask,
136   String shortName,
137   String longName) {
138   super.addElement(new PathTask(PathTask.SIDE, absTask, shortName, longName));
139 }
140 
141 
142   /**
143   * Insert the method's description here.
144   * Creation date: (4/4/2001 2:00:59 PM)
145   */
146   public String getId() {
147     return getIdValue();
148   }
149 
150 
151 public boolean isCard(){
152   return true;
153 }
154 
155 
156   /**
157   * Sets card ID.
158   * Creation date: (4/4/2001 2:00:59 PM)
159   * @param id Card ID
160   */
161   public void setId(String id) {
162     super.setIdValue(id);
163   }
164 
165 
166 /**
167  * This is the short form for defining a main path activity. 
168  * It assumes that a URL is all you need to move on. If you need to pass along some values 
169  * to the server by means of postfields, you will need to use the setPrimaryPathTask().<br/>
170  * This method will cause navigation to be supported in the form of a hyperlink on Nokia 
171  * phones and through softkeys on UP.Browser.<br/>
172  *
173  */
174 
175 public void setPrimaryPath(String URL, String shortName) {
176   setPrimaryPath(URL, shortName, shortName);
177 }
178 
179 
180 /**
181  * This is the short form for defining a main path activity. 
182  * It assumes that a URL is all you need to move on. If you need to pass along some values 
183  * to the server by means of postfields, you will need to use the setPrimaryPathTask().<br/>
184  * This method will cause navigation to be supported in the form of a hyperlink on Nokia 
185  * phones and through softkeys on UP.Browser.<br/>
186  *
187  */
188 
189 public void setPrimaryPath(String URL, String shortName, String longName) {
190     super.addElement(new PathTask(PathTask.PRIMARY, new Task("go",URL,"get"), shortName, longName));
191   }
192 
193 
194 /**
195 * This is the short form for defining a main path activity. 
196 *
197 */
198 
199 public void setPrimaryPathTask(
200   AbsTask absTask,
201   String shortName) {
202   setPrimaryPathTask(absTask,shortName,shortName);
203 }
204 
205 
206 /**
207 * This is the short form for defining a main path activity. 
208 *
209 */
210 
211 public void setPrimaryPathTask(
212   AbsTask absTask,
213   String shortName,
214   String longName) {
215   super.addElement(new PathTask(PathTask.PRIMARY, absTask, shortName, longName));
216 }
217 
218 
219 public void setTaskMenu(
220   TaskMenu taskMenu) {
221   super.addElement(taskMenu);
222 }
223 
224 
225 public void setTimer(Timer timer) {
226   addElement(timer); 
227 }
228 
229 
230   public void visit(WaomVisitor wv){
231     wv.visit(this);
232   }
233 }