Source Code Cross Referenced for TextTag.java in  » J2EE » Sofia » com » salmonllc » jsp » tags » 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 » J2EE » Sofia » com.salmonllc.jsp.tags 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //** Copyright Statement ***************************************************
002:        //The Salmon Open Framework for Internet Applications (SOFIA)
003:        // Copyright (C) 1999 - 2002, Salmon LLC
004:        //
005:        // This program is free software; you can redistribute it and/or
006:        // modify it under the terms of the GNU General Public License version 2
007:        // as published by the Free Software Foundation;
008:        //
009:        // This program is distributed in the hope that it will be useful,
010:        // but WITHOUT ANY WARRANTY; without even the implied warranty of
011:        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:        // GNU General Public License for more details.
013:        //
014:        // You should have received a copy of the GNU General Public License
015:        // along with this program; if not, write to the Free Software
016:        // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
017:        //
018:        // For more information please visit http://www.salmonllc.com
019:        //** End Copyright Statement ***************************************************
020:        package com.salmonllc.jsp.tags;
021:
022:        /////////////////////////
023:        //$Archive: /SOFIA/SourceCode/com/salmonllc/jsp/tags/TextTag.java $
024:        //$Author: Fred $
025:        //$Revision: 23 $
026:        //$Modtime: 12/23/02 2:45p $
027:        /////////////////////////
028:
029:        import com.salmonllc.html.*;
030:        import com.salmonllc.util.Util;
031:
032:        /**
033:         * This tag creates an HTMLText component
034:         */
035:
036:        public class TextTag extends BaseEmptyTag {
037:            private String _font;
038:            private String _text;
039:            private String _class;
040:            private String _theme;
041:            private String _dataSource;
042:            private String _fixhtml;
043:            private String _onmouseout;
044:            private String _onmouseover;
045:            private String _textlocalekey;
046:            private String _displayformatlocalekey;
047:            private String _displayformat;
048:
049:            /**
050:             * Creates the HtmlText component used by the tag
051:             */
052:
053:            public HtmlComponent createComponent() {
054:                HtmlText ht = null;
055:                if (!BaseTagHelper.isEmpty(_class)) {
056:                    HtmlStyle newStyle = new HtmlStyle(_class, null, null,
057:                            getHelper().getController());
058:                    if (!BaseTagHelper.isEmpty(_theme)) {
059:                        ht = new HtmlText(getName(), _text, newStyle,
060:                                getHelper().getController(), _theme);
061:                        ht.setVisible(BaseTagHelper.stringToBoolean(
062:                                getVisible(), true));
063:                        if (_dataSource != null)
064:                            ht.setDataSource(_dataSource);
065:
066:                        // setting whether to fixhtml characters
067:                        if (_fixhtml != null)
068:                            ht.setFixSpecialHtmlCharacters(BaseTagHelper
069:                                    .stringToBoolean(getFixhtml(), true));
070:                        if (_onmouseout != null)
071:                            ht.setOnMouseOut(getOnmouseout());
072:                        if (_onmouseover != null)
073:                            ht.setOnMouseOver(getOnmouseover());
074:                        if (_displayformatlocalekey != null)
075:                            ht
076:                                    .setDisplayFormatLocaleKey(_displayformatlocalekey);
077:                        if (_textlocalekey != null)
078:                            ht.setTextLocaleKey(_textlocalekey);
079:                        if (_displayformat != null)
080:                            ht.setDisplayFormat(_displayformat);
081:
082:                        return ht;
083:                    } else {
084:                        ht = new HtmlText(getName(), _text, newStyle,
085:                                getHelper().getController());
086:                        ht.setVisible(BaseTagHelper.stringToBoolean(
087:                                getVisible(), true));
088:                        if (_dataSource != null)
089:                            ht.setDataSource(_dataSource);
090:
091:                        // setting whether to fixhtml characters
092:                        if (_fixhtml != null)
093:                            ht.setFixSpecialHtmlCharacters(BaseTagHelper
094:                                    .stringToBoolean(getFixhtml(), true));
095:                        if (_onmouseout != null)
096:                            ht.setOnMouseOut(getOnmouseout());
097:                        if (_onmouseover != null)
098:                            ht.setOnMouseOver(getOnmouseover());
099:                        if (_displayformatlocalekey != null)
100:                            ht
101:                                    .setDisplayFormatLocaleKey(_displayformatlocalekey);
102:                        if (_displayformat != null)
103:                            ht.setDisplayFormat(_displayformat);
104:                        if (_textlocalekey != null)
105:                            ht.setTextLocaleKey(_textlocalekey);
106:                        if (_displayformat != null)
107:                            ht.setDisplayFormat(_displayformat);
108:
109:                        return ht;
110:                    }
111:                } else {
112:                    if (!BaseTagHelper.isEmpty(_theme)) {
113:                        ht = new HtmlText(getName(), _text, _font, getHelper()
114:                                .getController(), _theme);
115:                        ht.setVisible(BaseTagHelper.stringToBoolean(
116:                                getVisible(), true));
117:                        if (_dataSource != null)
118:                            ht.setDataSource(_dataSource);
119:
120:                        // setting whether to fixhtml characters
121:                        if (_fixhtml != null)
122:                            ht.setFixSpecialHtmlCharacters(BaseTagHelper
123:                                    .stringToBoolean(getFixhtml(), true));
124:                        if (_onmouseout != null)
125:                            ht.setOnMouseOut(getOnmouseout());
126:                        if (_onmouseover != null)
127:                            ht.setOnMouseOver(getOnmouseover());
128:                        if (_displayformatlocalekey != null)
129:                            ht
130:                                    .setDisplayFormatLocaleKey(_displayformatlocalekey);
131:                        if (_textlocalekey != null)
132:                            ht.setTextLocaleKey(_textlocalekey);
133:                        if (_displayformat != null)
134:                            ht.setDisplayFormat(_displayformat);
135:
136:                        return ht;
137:                    } else {
138:                        ht = new HtmlText(getName(), _text, _font, getHelper()
139:                                .getController());
140:                        ht.setVisible(BaseTagHelper.stringToBoolean(
141:                                getVisible(), true));
142:                        if (_dataSource != null)
143:                            ht.setDataSource(_dataSource);
144:
145:                        // setting whether to fixhtml characters
146:                        if (_fixhtml != null)
147:                            ht.setFixSpecialHtmlCharacters(BaseTagHelper
148:                                    .stringToBoolean(getFixhtml(), true));
149:                        if (_onmouseout != null)
150:                            ht.setOnMouseOut(getOnmouseout());
151:                        if (_onmouseover != null)
152:                            ht.setOnMouseOver(getOnmouseover());
153:                        if (_displayformatlocalekey != null)
154:                            ht
155:                                    .setDisplayFormatLocaleKey(_displayformatlocalekey);
156:                        if (_textlocalekey != null)
157:                            ht.setTextLocaleKey(_textlocalekey);
158:                        if (_displayformat != null)
159:                            ht.setDisplayFormat(_displayformat);
160:
161:                        return ht;
162:                    }
163:                }
164:            }
165:
166:            /**
167:             * Gets the onmouseout property for the tag
168:             */
169:
170:            public java.lang.String getOnmouseout() {
171:                return _onmouseout;
172:            }
173:
174:            /**
175:             * Gets the onmouseover property for the tag
176:             */
177:            public java.lang.String getOnmouseover() {
178:                return _onmouseover;
179:            }
180:
181:            /**
182:             * Get the Data Source the component should be bound to
183:             */
184:
185:            public String getDatasource() {
186:                return _dataSource;
187:            }
188:
189:            /**
190:             * Gets the font property for the tag
191:             */
192:
193:            public String getFont() {
194:                return _font;
195:            }
196:
197:            /**
198:             * Gets the text property for the tag
199:             */
200:
201:            public String getText() {
202:                return _text;
203:            }
204:
205:            /**
206:             * Gets the theme property for the tag
207:             */
208:
209:            public String getTheme() {
210:                return _theme;
211:            }
212:
213:            public void release() {
214:                super .release();
215:                _font = null;
216:                _text = null;
217:                _class = null;
218:                _theme = null;
219:                _textlocalekey = null;
220:                _displayformatlocalekey = null;
221:                _displayformat = null;
222:
223:            }
224:
225:            /**
226:             * Specify whether special html characters (<,>,&,; etc..) should be converted to Html Escape Sequences before being generated.
227:             */
228:            public void setFixhtml(java.lang.String new_fixhtml) {
229:                _fixhtml = new_fixhtml;
230:            }
231:
232:            /**
233:             * Use this method to set the javascript that will be executed when the mouse passes over out of all the components
234:             */
235:            public void setOnmouseout(java.lang.String new_onmouseout) {
236:                _onmouseout = new_onmouseout;
237:            }
238:
239:            /**
240:             * Use this method to set the javascript that will be executed when the mouse passes over any component in the link
241:             */
242:            public void setOnmouseover(java.lang.String new_onmouseover) {
243:                _onmouseover = new_onmouseover;
244:            }
245:
246:            /**
247:             * Set the Data Source the component should be bound to
248:             */
249:
250:            public void setDatasource(String newValue) {
251:                _dataSource = newValue;
252:            }
253:
254:            /**
255:             * Sets the font property for the tag
256:             */
257:
258:            public void setFont(String font) {
259:                _font = font;
260:            }
261:
262:            /**
263:             * Sets the text property for the tag
264:             */
265:
266:            public void setText(String newValue) {
267:                // fc:12/23/02 added the replacement of &QUOT; to ' to allow for JSP Engines which have problems with sinqle quotes in tags. e.g. Silverstream
268:                _text = Util.replaceString(newValue, "&QUOT;", "'", 1, -1);
269:            }
270:
271:            /**
272:             * Sets the theme property for the tag
273:             */
274:
275:            public void setTheme(String newValue) {
276:                _theme = newValue;
277:            }
278:
279:            /**
280:             * Gets the fixhtml property for the tag
281:             */
282:
283:            public java.lang.String getFixhtml() {
284:                return _fixhtml;
285:            }
286:
287:            /**
288:             * Sets the class property for the tag
289:             */
290:
291:            public void setClassname(String val) {
292:                _class = val;
293:            }
294:
295:            /**
296:             * Sets the textlocalekey property for the tag
297:             */
298:
299:            public void setTextlocalekey(String newValue) {
300:                _textlocalekey = newValue;
301:            }
302:
303:            /**
304:             * Sets the displayformatlocalekey property for the tag
305:             */
306:
307:            public void setDisplayformatlocalekey(String newValue) {
308:                _displayformatlocalekey = newValue;
309:            }
310:
311:            /**
312:             * Sets the displayformat property for the tag
313:             */
314:
315:            public void setDisplayformat(String newValue) {
316:                _displayformat = newValue;
317:            }
318:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.