Source Code Cross Referenced for FCKeditor.java in  » Ajax » zk » org » zkforge » fckez » 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.zkforge.fckez 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* FCKeditor.java
002:
003:         {{IS_NOTE
004:         Purpose:
005:         
006:         Description:
007:         
008:         History:
009:         Mon Dec 26 20:57:21     2005, Created by tomyeh
010:         }}IS_NOTE
011:
012:         Copyright (C) 2005 Potix Corporation. All Rights Reserved.
013:
014:         {{IS_RIGHT
015:         }}IS_RIGHT
016:         */
017:        package org.zkforge.fckez;
018:
019:        import org.zkoss.lang.Objects;
020:
021:        import org.zkoss.zk.ui.AbstractComponent;
022:        import org.zkoss.zk.ui.Executions;
023:        import org.zkoss.zk.ui.event.Events;
024:        import org.zkoss.zk.ui.ext.client.Inputable;
025:        import org.zkoss.zk.au.Command;
026:        import org.zkoss.zk.au.out.AuScript;
027:        import org.zkoss.zk.au.in.GenericCommand;
028:
029:        /**
030:         * The component used to represent <a
031:         * href="http://www.fckeditor.net/">FCKeditor&tl;/a>
032:         * 
033:         * @author tomyeh
034:         * @version $Revision: 1.6 $ $Date: 2006/03/31 08:38:55 $
035:         */
036:        public class FCKeditor extends AbstractComponent {
037:            private String _value = "";
038:
039:            private String _width = "100%";
040:
041:            private String _height = "200px";
042:
043:            private String _tbset;
044:
045:            private String _customPath;
046:
047:            /** Used by setTextByClient() to disable sending back the value */
048:            private String _txtByClient;
049:
050:            /**
051:             * Returns the value in this FCKeditor.
052:             */
053:            public String getValue() {
054:                return _value;
055:            }
056:
057:            /**
058:             * Sets the value for this FCKeditor.
059:             */
060:            public void setValue(String value) {
061:                if (value == null)
062:                    value = "";
063:                if (!value.equals(_value)) {
064:                    _value = value;
065:                    if (_txtByClient == null
066:                            || !Objects.equals(_txtByClient, value)) {
067:                        _txtByClient = null;
068:                        smartUpdate("value", value);
069:                    }
070:                }
071:            }
072:
073:            /**
074:             * Returns the toolbar set of this FCKeditor.
075:             * <p>
076:             * Default: null
077:             */
078:            public String getToolbarSet() {
079:                return _tbset;
080:            }
081:
082:            /**
083:             * Sets the value for this FCKeditor.
084:             */
085:            public void setToolbarSet(String tbset) {
086:                if (tbset != null && tbset.length() == 0)
087:                    tbset = null;
088:                if (!Objects.equals(tbset, _tbset)) {
089:                    _tbset = tbset;
090:                    smartUpdate("tbset", tbset);
091:                }
092:            }
093:
094:            /**
095:             * Returns the width of this FCKeditor.
096:             * <p>
097:             * Default: 100%
098:             */
099:            public String getWidth() {
100:                return _width;
101:            }
102:
103:            /**
104:             * Sets the width of this FCKeditor.
105:             */
106:            public void setWidth(String width) {
107:                if (width != null && width.length() == 0)
108:                    width = null;
109:                if (!Objects.equals(width, _width)) {
110:                    _width = width;
111:                    smartUpdate("width", width);
112:                }
113:            }
114:
115:            /**
116:             * Returns the height of this FCKeditor.
117:             * <p>
118:             * Default: 200px
119:             */
120:            public String getHeight() {
121:                return _height;
122:            }
123:
124:            /**
125:             * Sets the height of this FCKeditor.
126:             */
127:            public void setHeight(String height) {
128:                if (height != null && height.length() == 0)
129:                    height = null;
130:                if (!Objects.equals(height, _height)) {
131:                    _height = height;
132:                    smartUpdate("height", height);
133:                }
134:            }
135:
136:            /**
137:             * Returns the HTML attributes for this tag.
138:             * <p>
139:             * Used only for component development, not for application developers.
140:             */
141:            public String getOuterAttrs() {
142:                return Events.isListened(this , "onChange", true) ? " z.onChange=\"true\""
143:                        : null;
144:            }
145:
146:            /**
147:             * Set the url of the custom configuration .js file. See FCKeditor's 
148:             * <a href="http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_File">
149:             * Configurtions File</a> for details.
150:             * @param url the url path for the customized configuration path
151:             */
152:            public void setCustomConfigurationsPath(String url) {
153:                _customPath = url;
154:            }
155:
156:            /**
157:             * Get the url of the custom configuration .js file. See FCKeditor's 
158:             * <a href="http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_File">
159:             * Configurtions File</a> for details.
160:             */
161:            public String getCustomConfigurationsPath() {
162:                return _customPath;
163:            }
164:
165:            /**
166:             * Returns the configuration in String.
167:             * <p>
168:             * Used only for component development, not for application developers.
169:             */
170:            public String getConfigString() {
171:                if (_customPath != null && _customPath.length() > 0) {
172:                    return "CustomConfigurationsPath="
173:                            + Executions.encodeURL(_customPath);
174:                }
175:                return "";
176:            }
177:
178:            // -- Super --//
179:            /** Not childable. */
180:            public boolean isChildable() {
181:                return false;
182:            }
183:
184:            protected Object newExtraCtrl() {
185:                return new Inputable() {
186:                    /** Called by the browser to notify the content is changed. */
187:                    public void setTextByClient(String text) {
188:                        _txtByClient = text;
189:                        try {
190:                            setValue(text);
191:                        } finally {
192:                            _txtByClient = null;
193:                        }
194:                    }
195:                };
196:            }
197:
198:            /**
199:             * 
200:             * Used to catch "onSave" command from brower side.
201:             * <p>
202:             * Used only for component development, not for application developers.
203:             */
204:
205:            static {
206:                new GenericCommand("onSave", Command.IGNORE_OLD_EQUIV);
207:            };
208:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.