Source Code Cross Referenced for JspTableRow.java in  » J2EE » Sofia » com » salmonllc » jsp » 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 
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;
021:
022:        /////////////////////////
023:        //$Archive: /SOFIA/SourceCode/com/salmonllc/jsp/JspTableRow.java $
024:        //$Author: Dan $ 
025:        //$Revision: 18 $ 
026:        //$Modtime: 10/21/04 2:40p $ 
027:        /////////////////////////
028:
029:        import com.salmonllc.html.*;
030:
031:        /**
032:         * This class is used to represent on row &ltTR> in an JSP Table
033:         */
034:        public class JspTableRow extends JspContainer {
035:            private String _align = HtmlTable.ALIGN_NONE;
036:            private String _vAlign = HtmlTable.VALIGN_NONE;
037:            private String _bgcolor = null;
038:            private String _style = null;
039:            private String _id = null;
040:            private String _onmouseover = null;
041:            private String _onmouseout = null;
042:            private String _onmousedown = null;
043:            private String _onclick = null;
044:            private String _inLineStyle = null;
045:
046:            public JspTableRow(String name, com.salmonllc.html.HtmlPage p) {
047:                super (name, p);
048:            }
049:
050:            public void generateHTML(TagWriter t, String content,
051:                    String defaultBackgroundColor, String defaultStyleClass,
052:                    int rowNo) throws java.io.IOException {
053:                if (!getVisible())
054:                    return;
055:
056:                JspDataTable tab = getParentDataTable();
057:                HtmlRowHighlighter rowHighligher = null;
058:                if (tab != null)
059:                    rowHighligher = tab.getRowHighlighter();
060:
061:                StringBuffer sb = new StringBuffer();
062:
063:                sb.append("<TR");
064:
065:                if (getAlign() != null) {
066:                    if (!getAlign().equals(HtmlTable.ALIGN_NONE))
067:                        sb.append(" ALIGN=\"" + getAlign() + "\"");
068:                }
069:                if (getVertAlign() != null) {
070:                    if (!getVertAlign().equals(HtmlTable.VALIGN_NONE))
071:                        sb.append(" VALIGN=\"" + getVertAlign() + "\"");
072:                }
073:
074:                if (getStyle() != null)
075:                    sb.append(" CLASS=\"" + getStyle() + "\"");
076:                else if (defaultStyleClass != null)
077:                    sb.append(" CLASS=\"" + defaultStyleClass + "\"");
078:
079:                if (getInLineStyle() != null)
080:                    sb.append(" STYLE=\"" + getInLineStyle() + "\"");
081:
082:                String bgColor = "";
083:                if (getBackgroundColor() != null) {
084:                    if (!getBackgroundColor().equals(""))
085:                        bgColor = getBackgroundColor();
086:                } else if (defaultBackgroundColor != null) {
087:                    if (!defaultBackgroundColor.equals(""))
088:                        bgColor = defaultBackgroundColor;
089:                }
090:
091:                if (tab != null && tab.getRowHighlighter() != null)
092:                    sb.append(" BGCOLOR=\""
093:                            + tab.getRowHighlighter().getBgColorForRow(rowNo,
094:                                    bgColor, this ) + "\"");
095:                else
096:                    sb.append(" BGCOLOR=\"" + bgColor + "\"");
097:
098:                if (getOnmouseover() != null) {
099:                    sb.append(" onMouseOver=\"" + getOnmouseover() + "\"");
100:                }
101:                if (getOnmouseout() != null) {
102:                    sb.append(" onMouseOut=\"" + getOnmouseout() + "\"");
103:                }
104:
105:                String onMouseDown = "";
106:                if (getOnmousedown() != null)
107:                    onMouseDown += getOnmousedown();
108:                if (rowHighligher != null)
109:                    onMouseDown += rowHighligher
110:                            .generateJavaScriptForTrOnMouseDown(rowNo, this );
111:                if (onMouseDown.length() > 0)
112:                    sb.append(" onMouseDown=\"" + onMouseDown + "\"");
113:
114:                String onClick = "";
115:                if (getOnclick() != null)
116:                    onClick += getOnclick();
117:                if (rowHighligher != null)
118:                    onClick += rowHighligher.generateJavaScriptForTrOnClick();
119:                if (onClick.length() > 0)
120:                    sb.append(" onClick=\"" + onClick + "\"");
121:
122:                sb.append(">");
123:
124:                t.print(sb.toString(), TagWriter.TYPE_BEGIN_TAG);
125:                t.print(content, TagWriter.TYPE_CONTENT);
126:                t.print("</TR>", TagWriter.TYPE_END_TAG);
127:
128:            }
129:
130:            /**
131:             * Returns the alignment of the row
132:             */
133:            public String getAlign() {
134:                return _align;
135:            }
136:
137:            /**
138:             * Returns the background color of the row
139:             */
140:            public String getBackgroundColor() {
141:                return _bgcolor;
142:            }
143:
144:            /**
145:             * Returns the style of the row
146:             */
147:            public String getStyle() {
148:                return _style;
149:            }
150:
151:            /**
152:             * Returns the vertical alignment of the row
153:             */
154:            public String getVertAlign() {
155:                return _vAlign;
156:            }
157:
158:            /**
159:             * Sets the alignment of the row
160:             */
161:            public void setAlign(String value) {
162:                _align = value;
163:            }
164:
165:            /**
166:             * Sets the background color of the row
167:             */
168:
169:            public void setBackgroundColor(String color) {
170:                _bgcolor = color;
171:            }
172:
173:            /**
174:             * Sets the style of the row
175:             */
176:
177:            public void setStyle(String style) {
178:                _style = style;
179:            }
180:
181:            /**
182:             * Sets the vertical alignment of the row
183:             */
184:
185:            public void setVertAlign(String value) {
186:                _vAlign = value;
187:            }
188:
189:            public void setId(String id) {
190:                _id = id;
191:            }
192:
193:            public String getId() {
194:                return _id;
195:            }
196:
197:            /**
198:             * @return
199:             */
200:            public String getOnclick() {
201:                return _onclick;
202:            }
203:
204:            /**
205:             * @return
206:             */
207:            public String getOnmouseout() {
208:                return _onmouseout;
209:            }
210:
211:            /**
212:             * @return
213:             */
214:            public String getOnmouseover() {
215:                return _onmouseover;
216:            }
217:
218:            /**
219:             * @param string
220:             */
221:            public void setOnclick(String string) {
222:                _onclick = string;
223:            }
224:
225:            /**
226:             * @param string
227:             */
228:            public void setOnmouseout(String string) {
229:                _onmouseout = string;
230:            }
231:
232:            /**
233:             * @param string
234:             */
235:            public void setOnmouseover(String string) {
236:                _onmouseover = string;
237:            }
238:
239:            /**
240:             * Gets the in line style of the row
241:             */
242:            public String getInLineStyle() {
243:                return _inLineStyle;
244:            }
245:
246:            /**
247:             * Sets the in line style of the row
248:             */
249:            public void setInLineStyle(String string) {
250:                _inLineStyle = string;
251:            }
252:
253:            /**
254:             * @return Returns the onmousedown.
255:             */
256:            public String getOnmousedown() {
257:                return _onmousedown;
258:            }
259:
260:            /**
261:             * @param onmousedown The onmousedown to set.
262:             */
263:            public void setOnmousedown(String onmousedown) {
264:                _onmousedown = onmousedown;
265:            }
266:
267:            /**
268:             *  @return the parent datatable that this component is in
269:             */
270:            public JspDataTable getParentDataTable() {
271:                HtmlComponent parent = getParent();
272:                while (parent != null) {
273:                    if (parent instanceof  JspDataTable)
274:                        return (JspDataTable) parent;
275:                    parent = parent.getParent();
276:                }
277:                return null;
278:            }
279:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.