01: /* Identifiable.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: May 29, 2007 4:01:52 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;
20:
21: import javax.microedition.lcdui.Command;
22:
23: import org.zkoss.zkmob.ui.ZkDesktop;
24:
25: /**
26: * A ZK component.
27: *
28: * @author henrichen
29: */
30: public interface ZkComponent {
31: /**
32: * Get Id.
33: * @return id
34: */
35: public String getId();
36:
37: /**
38: * Get ZK Desktop Controller.
39: */
40: public ZkDesktop getZkDesktop();
41:
42: /**
43: * Get Parent.
44: */
45: public ZkComponent getParent();
46:
47: /**
48: * Set Parent.
49: */
50: public void setParent(ZkComponent parent);
51:
52: /**
53: * Add Command to this component.
54: */
55: public void addCommand(Command cmd);
56:
57: /**
58: * Remove Command from this component.
59: */
60: public void removeCommand(Command cmd);
61:
62: /**
63: * Update a specific attribute of this Zk component.
64: * @param attr
65: * @param val
66: */
67: public void setAttr(String attr, String val);
68: }
|