01: /* ZkTextBox.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: May 29, 2007 3:33:11 PM, Created by henrichen
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zkmob.ui;
20:
21: import javax.microedition.lcdui.TextBox;
22:
23: import org.zkoss.zkmob.ZkComponent;
24:
25: /**
26: * ZK TextBox.
27: * @author henrichen
28: *
29: */
30: public class ZkTextBox extends TextBox implements ZkComponent {
31: private String _id;
32: private ZkDesktop _zk;
33:
34: public ZkTextBox(ZkDesktop zk, String id, String title,
35: String text, int maxSize, int constraints) {
36: super (title, text, maxSize, constraints);
37: _id = id;
38: _zk = zk;
39: }
40:
41: //--ZkComponent--//
42: public String getId() {
43: return _id;
44: }
45:
46: public void setParent(ZkComponent parent) {
47: _zk = (ZkDesktop) parent;
48: }
49:
50: public ZkComponent getParent() {
51: return getZkDesktop();
52: }
53:
54: public ZkDesktop getZkDesktop() {
55: return _zk;
56: }
57:
58: public void setAttr(String attr, String val) {
59: //TODO:
60: }
61: }
|