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


001:        /*
002:         * Created on Apr 5, 2004
003:         *
004:         * To change the template for this generated file go to
005:         * Window>Preferences>Java>Code Generation>Code and Comments
006:         */
007:        //** Copyright Statement ***************************************************
008:        //The Salmon Open Framework for Internet Applications (SOFIA)
009:        //Copyright (C) 1999 - 2002, Salmon LLC
010:        //
011:        //This program is free software; you can redistribute it and/or
012:        //modify it under the terms of the GNU General Public License version 2
013:        //as published by the Free Software Foundation;
014:        //
015:        //This program is distributed in the hope that it will be useful,
016:        //but WITHOUT ANY WARRANTY; without even the implied warranty of
017:        //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
018:        //GNU General Public License for more details.
019:        //
020:        //You should have received a copy of the GNU General Public License
021:        //along with this program; if not, write to the Free Software
022:        //Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
023:        //
024:        //For more information please visit http://www.salmonllc.com
025:        //** End Copyright Statement ***************************************************
026:        package com.salmonllc.html;
027:
028:        import com.salmonllc.properties.Props;
029:
030:        /**
031:         * A renderer for the Page Selector for JSPDataTable, HtmlDataTable, HtmlDataTable2D and JspList, that renders as submit buttons
032:         */
033:        public class DataTablePageSelectRendererSubmit extends
034:                DataTablePageSelectRenderer {
035:            protected String _font = Props.FONT_BUTTON;
036:
037:            public String generateRowSelector(HtmlComponent comp, String theme,
038:                    String pageLabel, String pageOfLabel, int page,
039:                    int firstSubmitButton, int noButtons, int maxPagingButtons,
040:                    String imageURL) {
041:                Props pr = comp.getPage().getPageProperties();
042:                String fontStart = pr.getThemeProperty(theme, _font
043:                        + Props.TAG_START);
044:                String fontEnd = pr.getThemeProperty(theme, _font
045:                        + Props.TAG_END);
046:
047:                String buttonBgColor = pr.getThemeProperty(theme,
048:                        Props.BUTTON_BG_COLOR);
049:                String buttonFontStyle = pr.getThemeProperty(theme,
050:                        Props.BUTTON_FONT_STYLE);
051:                String styleClass = pr.getThemeProperty(theme,
052:                        Props.BUTTON_STYLE_CLASS);
053:                String style = "";
054:                if (buttonBgColor != null || buttonFontStyle != null) {
055:                    style = " style=\"";
056:                    if (buttonBgColor != null)
057:                        style += "background-color:" + buttonBgColor + ";";
058:                    if (buttonFontStyle != null)
059:                        style += buttonFontStyle;
060:                    style += "\"";
061:                }
062:
063:                if (styleClass != null)
064:                    styleClass = " class=\"" + styleClass + "\"";
065:
066:                if (fontStart == null) {
067:                    fontStart = "";
068:                    fontEnd = "";
069:                }
070:                StringBuffer sb = new StringBuffer();
071:
072:                sb.append(fontStart + pageLabel + ": " + page + " "
073:                        + pageOfLabel + " " + noButtons + " ");
074:
075:                if (noButtons > maxPagingButtons && firstSubmitButton > 0) {
076:                    if (noButtons > 2)
077:                        sb.append("<INPUT TYPE=\"SUBMIT\" name=\""
078:                                + comp.getFullName()
079:                                + "_page_first\" value=\"<<\"" + style
080:                                + styleClass + ">");
081:                    sb.append("<INPUT TYPE=\"SUBMIT\" name=\""
082:                            + comp.getFullName() + "_page_prior\" value=\"<\""
083:                            + style + styleClass + ">");
084:                }
085:                for (int i = 0; (i < noButtons) && (i < maxPagingButtons); i++) {
086:                    sb.append("<INPUT TYPE=\"SUBMIT\" name=\""
087:                            + comp.getFullName() + "_page_"
088:                            + (i + firstSubmitButton) + "\" value=\""
089:                            + (firstSubmitButton + i + 1) + "\"" + style
090:                            + styleClass + ">");
091:                }
092:                if ((firstSubmitButton + (maxPagingButtons == 0 ? 1
093:                        : maxPagingButtons)) < noButtons) {
094:                    sb.append("<INPUT TYPE=\"SUBMIT\" name=\""
095:                            + comp.getFullName() + "_page_next\" value=\">\""
096:                            + style + styleClass + ">");
097:                    if (noButtons > 2)
098:                        sb.append("<INPUT TYPE=\"SUBMIT\" name=\""
099:                                + comp.getFullName()
100:                                + "_page_last\" value=\">>\"" + style
101:                                + styleClass + ">");
102:                }
103:                sb.append(fontEnd);
104:                return sb.toString();
105:            }
106:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.