Source Code Cross Referenced for ImageTag.java in  » Portal » gridsphere » org » gridsphere » provider » portletui » 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 » Portal » gridsphere » org.gridsphere.provider.portletui.tags 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003:         * @author <a href="mailto:oliver.wehrens@aei.mpg.de">Oliver Wehrens</a>
004:         * @version $Id: ImageTag.java 6385 2007-10-25 14:02:26Z wehrens $
005:         */
006:        package org.gridsphere.provider.portletui.tags;
007:
008:        import org.gridsphere.provider.portletui.beans.ImageBean;
009:
010:        import javax.servlet.jsp.JspException;
011:        import javax.servlet.jsp.JspWriter;
012:        import javax.servlet.jsp.tagext.Tag;
013:
014:        /**
015:         * The <code>ImageTag</code> represents an href img element
016:         */
017:        public class ImageTag extends BaseComponentTag {
018:
019:            protected ImageBean urlImageBean = null;
020:            protected String src = null;
021:            protected String border = null;
022:            protected String title = null;
023:            protected String alt = null;
024:            protected String width = null;
025:            protected String height = null;
026:            protected String align = null;
027:
028:            /**
029:             * Returns the location of the image
030:             *
031:             * @return src the location of the image
032:             */
033:            public String getSrc() {
034:                return src;
035:            }
036:
037:            /**
038:             * Sets the location of the image
039:             *
040:             * @param src the location of the image
041:             */
042:            public void setSrc(String src) {
043:                this .src = src;
044:            }
045:
046:            /**
047:             * Return the image title border
048:             *
049:             * @return the image title border
050:             */
051:            public String getBorder() {
052:                return border;
053:            }
054:
055:            /**
056:             * Sets the image title border
057:             *
058:             * @param border the image title border
059:             */
060:            public void setBorder(String border) {
061:                this .border = border;
062:            }
063:
064:            /**
065:             * Return the image title
066:             *
067:             * @return the image title
068:             */
069:            public String getTitle() {
070:                return title;
071:            }
072:
073:            /**
074:             * Sets the image title
075:             *
076:             * @param title the image title
077:             */
078:            public void setTitle(String title) {
079:                this .title = title;
080:            }
081:
082:            /**
083:             * Return the associated alt attribute
084:             *
085:             * @return the alt tag
086:             */
087:            public String getAlt() {
088:                return alt;
089:            }
090:
091:            /**
092:             * Sets an alt tag to display
093:             *
094:             * @param alt the alt tag
095:             */
096:            public void setAlt(String alt) {
097:                this .alt = alt;
098:            }
099:
100:            /**
101:             * Sets the table alignment e.g. "left", "top", "bottom" or "right"
102:             *
103:             * @param align the table alignment
104:             */
105:            public void setAlign(String align) {
106:                this .align = align;
107:            }
108:
109:            /**
110:             * Returns the table alignment e.g. "left", "top", "bottom" or "right"
111:             *
112:             * @return the table alignment
113:             */
114:            public String getAlign() {
115:                return align;
116:            }
117:
118:            /**
119:             * Sets the table cell width
120:             *
121:             * @param width the table cell width
122:             */
123:            public void setWidth(String width) {
124:                this .width = width;
125:            }
126:
127:            /**
128:             * Returns the table cell width
129:             *
130:             * @return the table cell width
131:             */
132:            public String getWidth() {
133:                return width;
134:            }
135:
136:            /**
137:             * Sets the table cell height
138:             *
139:             * @param height the table cell height
140:             */
141:            public void setHeight(String height) {
142:                this .height = height;
143:            }
144:
145:            /**
146:             * Returns the table cell height
147:             *
148:             * @return the table cell height
149:             */
150:            public String getHeight() {
151:                return height;
152:            }
153:
154:            private void setImageBean(ImageBean urlImageBean) {
155:                this .setBaseComponentBean(urlImageBean);
156:                if (alt != null)
157:                    urlImageBean.setAlt(alt);
158:                if (title != null)
159:                    urlImageBean.setTitle(title);
160:                if (src != null)
161:                    urlImageBean.setSrc(src);
162:                if (border != null)
163:                    urlImageBean.setBorder(border);
164:                if (width != null)
165:                    urlImageBean.setWidth(width);
166:                if (height != null)
167:                    urlImageBean.setHeight(height);
168:                if (align != null)
169:                    urlImageBean.setAlign(align);
170:            }
171:
172:            public int doStartTag() throws JspException {
173:                if (!beanId.equals("")) {
174:                    urlImageBean = (ImageBean) getTagBean();
175:                    if (urlImageBean == null) {
176:                        urlImageBean = new ImageBean();
177:                    }
178:                } else {
179:                    urlImageBean = new ImageBean();
180:                }
181:                setImageBean(urlImageBean);
182:
183:                Tag parent = getParent();
184:                if (parent instanceof  ActionLinkTag) {
185:                    ActionLinkTag actionTag = (ActionLinkTag) parent;
186:                    actionTag.setImageBean(urlImageBean);
187:                } else {
188:                    try {
189:                        JspWriter out = pageContext.getOut();
190:                        out.print(urlImageBean.toStartString());
191:                    } catch (Exception e) {
192:                        throw new JspException(e.getMessage());
193:                    }
194:                }
195:                return SKIP_BODY;
196:            }
197:
198:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.