Source Code Cross Referenced for HTMLImgTag.java in  » Chart » cewolf-1.0 » de » laures » cewolf » taglib » html » 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 » Chart » cewolf 1.0 » de.laures.cewolf.taglib.html 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ================================================================
002:         * Cewolf : Chart enabling Web Objects Framework
003:         * ================================================================
004:         *
005:         * Project Info:  http://cewolf.sourceforge.net
006:         * Project Lead:  Guido Laures (guido@laures.de);
007:         *
008:         * (C) Copyright 2002, by Guido Laures
009:         *
010:         * This library is free software; you can redistribute it and/or modify it under the terms
011:         * of the GNU Lesser General Public License as published by the Free Software Foundation;
012:         * either version 2.1 of
013:         * the License, or (at your option) any later version.
014:         *
015:         * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
016:         * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
017:         * See the GNU Lesser General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public License along with this
020:         * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
021:         * Boston, MA 02111-1307, USA.
022:         */
023:
024:        package de.laures.cewolf.taglib.html;
025:
026:        import java.io.IOException;
027:        import java.io.Serializable;
028:        import java.io.Writer;
029:
030:        /**
031:         * HTML img tag.
032:         * @author  Guido Laures
033:         */
034:        public class HTMLImgTag extends AbstractHTMLBaseTag implements 
035:                Serializable {
036:
037:            private final static String TAG_NAME = "IMG";
038:
039:            /** Holds value of property width. */
040:            protected int width = UNDEFINED_INT;
041:
042:            /** Holds value of property height. */
043:            protected int height = UNDEFINED_INT;
044:
045:            /** Holds value of property src. */
046:            protected String src = UNDEFINED_STR;
047:
048:            /** Holds value of property alt. */
049:            protected String alt = "";
050:
051:            /** Holds value of property longDesc. */
052:            protected String longDesc = UNDEFINED_STR;
053:
054:            /** Holds value of property useMap. */
055:            protected String useMap = UNDEFINED_STR;
056:
057:            /** Holds value of property ismap. */
058:            protected String ismap = UNDEFINED_STR;
059:
060:            /** Holds value of property align. */
061:            protected String align = UNDEFINED_STR;
062:
063:            /** Holds value of property border. */
064:            protected int border = 0;
065:
066:            /** Holds value of property hSpace. */
067:            protected int hSpace = UNDEFINED_INT;
068:
069:            /** Holds value of property vSpace. */
070:            protected int vSpace = UNDEFINED_INT;
071:
072:            /**
073:             * Add or not JSESSIONID
074:             */
075:            protected boolean forceSessionId = true;
076:
077:            /**
078:             * Remove image from Storage after rendering
079:             */
080:            protected boolean removeAfterRender = false;
081:
082:            /*
083:             public void writeTag(Writer writer) throws IOException {
084:                writer.write("<img ");
085:                writeAttributes(writer);
086:                writer.write("/>");
087:            }
088:             **/
089:
090:            public void writeAttributes(Writer wr) {
091:                try {
092:                    super .writeAttributes(wr);
093:                    appendAttributeDeclaration(wr, this .border, "BORDER");
094:                    appendAttributeDeclaration(wr, this .hSpace, "HSPACE");
095:                    appendAttributeDeclaration(wr, this .height, "HEIGHT");
096:                    appendAttributeDeclaration(wr, this .vSpace, "VSPACE");
097:                    appendAttributeDeclaration(wr, this .width, "WIDTH");
098:                    appendAttributeDeclaration(wr, this .align, "ALIGN");
099:                    appendAttributeDeclaration(wr, this .alt, "ALT");
100:                    appendAttributeDeclaration(wr, this .ismap, "ISMAP");
101:                    appendAttributeDeclaration(wr, this .longDesc, "LONGDESC");
102:                    appendAttributeDeclaration(wr, this .src, "SRC");
103:                    appendAttributeDeclaration(wr, this .useMap, "USEMAP");
104:                } catch (IOException ioex) {
105:                    ioex.printStackTrace();
106:                }
107:            }
108:
109:            protected void reset() {
110:                // width = UNDEFINED_INT;
111:                // height = UNDEFINED_INT;
112:                src = UNDEFINED_STR;
113:                alt = "";
114:                longDesc = UNDEFINED_STR;
115:                useMap = UNDEFINED_STR;
116:                ismap = UNDEFINED_STR;
117:                align = UNDEFINED_STR;
118:                border = 0;
119:                hSpace = UNDEFINED_INT;
120:                vSpace = UNDEFINED_INT;
121:                forceSessionId = true;
122:                removeAfterRender = false;
123:                super .reset();
124:            }
125:
126:            /** Setter for property width.
127:             * @param width New value of property width.
128:             */
129:            public void setWidth(int width) {
130:                this .width = width;
131:            }
132:
133:            /** Setter for property height.
134:             * @param height New value of property height.
135:             */
136:            public void setHeight(int height) {
137:                this .height = height;
138:            }
139:
140:            /** Setter for property src.
141:             * @param src New value of property src.
142:             */
143:            public void setSrc(String src) {
144:                this .src = src;
145:            }
146:
147:            /** Setter for property alt.
148:             * @param alt New value of property alt.
149:             */
150:            public void setAlt(String alt) {
151:                this .alt = alt;
152:            }
153:
154:            /** Setter for property longDesc.
155:             * @param longDesc New value of property longDesc.
156:             */
157:            public void setLongdesc(String longDesc) {
158:                this .longDesc = longDesc;
159:            }
160:
161:            /** Setter for property useMap.
162:             * @param useMap New value of property useMap.
163:             */
164:            public void setUsemap(String useMap) {
165:                this .useMap = useMap;
166:            }
167:
168:            /** Setter for property ismap.
169:             * @param ismap New value of property ismap.
170:             */
171:            public void setIsmap(String ismap) {
172:                this .ismap = ismap;
173:            }
174:
175:            /** Setter for property align.
176:             * @param align New value of property align.
177:             */
178:            public void setAlign(String align) {
179:                this .align = align;
180:            }
181:
182:            /** Setter for property border.
183:             * @param border New value of property border.
184:             */
185:            public void setBorder(int border) {
186:                this .border = border;
187:            }
188:
189:            /** Setter for property hSpace.
190:             * @param hSpace New value of property hSpace.
191:             */
192:            public void setHspace(int hSpace) {
193:                this .hSpace = hSpace;
194:            }
195:
196:            /** Setter for property vSpace.
197:             * @param vSpace New value of property vSpace.
198:             */
199:            public void setVspace(int vSpace) {
200:                this .vSpace = vSpace;
201:            }
202:
203:            protected String getTagName() {
204:                return TAG_NAME;
205:            }
206:
207:            protected boolean hasBody() {
208:                return false;
209:            }
210:
211:            protected boolean wellFormed() {
212:                return false;
213:            }
214:
215:            /**
216:             * @return Returns the forceSessionId.
217:             */
218:            public boolean isForceSessionId() {
219:                return forceSessionId;
220:            }
221:
222:            /**
223:             * @param forceSessionId The forceSessionId to set.
224:             */
225:            public void setForceSessionId(boolean forceSessionId) {
226:                this .forceSessionId = forceSessionId;
227:            }
228:
229:            /**
230:             * @return Returns the removeAfterRender.
231:             */
232:            public boolean isRemoveAfterRender() {
233:                return removeAfterRender;
234:            }
235:
236:            /**
237:             * @param removeAfterRender The removeAfterRender to set.
238:             */
239:            public void setRemoveAfterRender(boolean removeAfterRender) {
240:                this.removeAfterRender = removeAfterRender;
241:            }
242:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.