Source code: com/openwave/oui/waomelements/SimpleLink.java
1 package com.openwave.oui.waomelements;
2
3 import com.openwave.oui.framework.*;
4
5 /**
6 * The simple link object is just a plain <code><a href="url"></a></code> link.
7 * Encapsulation into an object is intended for support of the "accesskey" attribute.
8 * "accesskey" is an Openwave extension that lets developers associate a number between 0 and 9 with the link.
9 * This will be a keyboard accelerator for power-users who will manage to trigger the link simply by
10 * pressing the corresponding number.<br/><br/>
11 * Creation date: (4/4/2001 3:37:20 PM)
12 * @author: Lars Gunder Knudsen
13 */
14 public class SimpleLink extends WaomComposite {
15 private String text = null;
16 private String title = null;
17 private String accesskey = null;
18 private String simpleURL = null;
19 private String tabindex = null;
20 private final static long serialVersionUID = 3407840682640506723L;
21 /**
22 * Insert the method's description here.
23 * Creation date: (4/4/2001 3:39:40 PM)
24 * @param param java.lang.String
25 */
26 public SimpleLink(String simpleURL, String text) {
27 super();
28 this.simpleURL = simpleURL;
29 this.text = text;
30 //waomElementName = "SimpleLink";
31 setWaomElementName("SimpleLink");
32 }
33
34 public String getText() {
35 return this.text;
36 }
37 public void setText(String text) {
38 this.text = text;
39 }
40 public String getURL() {
41 return this.simpleURL;
42 }
43 public void setURL(String simpleURL) {
44 this.simpleURL = simpleURL;
45 }
46
47
48 public String getAccesskey() {
49 return this.accesskey;
50 }
51
52
53 /**
54 * Insert the method's description here.
55 * Creation date: (4/5/2001 10:33:38 AM)
56 */
57 public String getTitle() {
58 return this.title;
59 }
60
61
62 /**
63 * Set accesskey attribute for devices which support it.
64 * @param accesskey a value between 0 and 9.
65 *
66 */
67 public void setAccesskey(int accesskey) {
68 this.accesskey = "" + accesskey;
69 }
70
71
72 /**
73 * Set accesskey attribute for devices which support it.
74 * @param accesskey a value between "0" and "9".
75 *
76 */
77 public void setAccesskey(String accesskey) {
78 this.accesskey = accesskey;
79 }
80
81
82 /**
83 * Set title attribute.
84 *
85 */
86 public void setTitle(String title) {
87 this.title = title;
88 }
89
90
91 public void visit(WaomVisitor wv){
92 wv.visit(this);
93 }
94
95 /**
96 * Insert the method's description here.
97 * Creation date: (08-11-2001 15:42:01)
98 * @param newTabindex java.lang.String
99 */
100 public void setTabindex(java.lang.String newTabindex) {
101 tabindex = newTabindex;
102 }
103 /**
104 * Insert the method's description here.
105 * Creation date: (08-11-2001 15:42:01)
106 * @return java.lang.String
107 */
108 public java.lang.String getTabindex() {
109 return tabindex;
110 }
111
112 }