Source Code Cross Referenced for ZkTextField.java in  » Ajax » zk » org » zkoss » zkmob » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » zk » org.zkoss.zkmob.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ZkTextField.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		May 29, 2007 3:43:22 PM, Created by henrichen
010:        }}IS_NOTE
011:
012:        Copyright (C) 2007 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.zkmob.ui;
020:
021:        import javax.microedition.lcdui.Form;
022:        import javax.microedition.lcdui.TextField;
023:
024:        import org.zkoss.zkmob.Inputable;
025:        import org.zkoss.zkmob.Itemable;
026:        import org.zkoss.zkmob.UiManager;
027:        import org.zkoss.zkmob.ZkComponent;
028:
029:        /**
030:         * @author henrichen
031:         *
032:         */
033:        public class ZkTextField extends TextField implements  ZkComponent,
034:                Inputable, Itemable {
035:            private String _id;
036:            private ZkDesktop _zk;
037:            private Boolean _onChange; //null mean no such event required, t means asap, f means !asap
038:            private Boolean _onChanging; //null mean no such event required, t means asap, f means !asap
039:            private ZkForm _form;
040:
041:            public ZkTextField(ZkDesktop zk, String id, String label,
042:                    String text, int maxSize, int constraints,
043:                    Boolean onChange, Boolean onChanging) {
044:                super (label, text, maxSize, constraints);
045:                _id = id;
046:                _zk = zk;
047:                _onChange = onChange;
048:                _onChanging = onChanging;
049:            }
050:
051:            //--Inputable--//
052:            public Boolean getOnChange() {
053:                return _onChange;
054:            }
055:
056:            public Boolean getOnChanging() {
057:                return _onChanging;
058:            }
059:
060:            //--ZkComponent--//
061:            public String getId() {
062:                return _id;
063:            }
064:
065:            public ZkComponent getParent() {
066:                return (ZkComponent) getForm();
067:            }
068:
069:            public void setParent(ZkComponent parent) {
070:                if (_form != parent) { //yes, !=, not !equals
071:                    if (_form != null) {
072:                        _form.removeItem(this );
073:                    }
074:                    _form = (ZkForm) parent;
075:                    ZkDesktop newzk = null;
076:                    if (_form != null) {
077:                        _form.appendChild(this );
078:                        newzk = _form.getZkDesktop();
079:                    }
080:                    if (_zk != newzk) {
081:                        _zk = newzk;
082:                    }
083:                }
084:            }
085:
086:            public ZkDesktop getZkDesktop() {
087:                return _zk;
088:            }
089:
090:            public void setAttr(String attr, String val) {
091:                UiManager.setItemAttr(this , attr, val);
092:                if ("tx".equals(attr)) {
093:                    setString(val);
094:                } else if ("xs".equals(attr)) {
095:                    setMaxSize(val == null ? 32 : Integer.parseInt(val));
096:                } else if ("cs".equals(attr)) {
097:                    setConstraints(Integer.parseInt(val));
098:                } else if ("md".equals(attr)) { //initialInputMode
099:                    setInitialInputMode(val);
100:                }
101:            }
102:
103:            //--Itemable--//
104:            public Form getForm() {
105:                return _form;
106:            }
107:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.