Source Code Cross Referenced for KualiTableRenderFormMetadata.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » web » struts » form » 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 » ERP CRM Financial » Kuali Financial System » org.kuali.core.web.struts.form 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.core.web.struts.form;
017:
018:        import org.kuali.core.util.TableRenderUtil;
019:
020:        /**
021:         * This class holds the metadata necessary to render a table when displaytag is not being used.
022:         */
023:        public class KualiTableRenderFormMetadata {
024:            private int viewedPageNumber;
025:            private int totalNumberOfPages;
026:            private int firstRowIndex;
027:            private int lastRowIndex;
028:            private int switchToPageNumber;
029:
030:            /**
031:             * The number of rows that match the query criteria
032:             */
033:            private int resultsActualSize;
034:
035:            /**
036:             * The number of rows that match the query criteria or
037:             *  the max results limit size (if applicable), whichever is less
038:             */
039:            private int resultsLimitedSize;
040:
041:            /**
042:             * when the looked results screen was rendered, the index of the column that the results were sorted on.  -1 for unknown, index numbers
043:             * starting at 0
044:             */
045:            private int previouslySortedColumnIndex;
046:
047:            /**
048:             * Comment for <code>columnToSortIndex</code>
049:             */
050:            private int columnToSortIndex;
051:
052:            private boolean sortDescending;
053:
054:            public KualiTableRenderFormMetadata() {
055:                sortDescending = false;
056:            }
057:
058:            /**
059:             * Gets the columnToSortIndex attribute. 
060:             * @return Returns the columnToSortIndex.
061:             */
062:            public int getColumnToSortIndex() {
063:                return columnToSortIndex;
064:            }
065:
066:            /**
067:             * Sets the columnToSortIndex attribute value.
068:             * @param columnToSortIndex The columnToSortIndex to set.
069:             */
070:            public void setColumnToSortIndex(int columnToSortIndex) {
071:                this .columnToSortIndex = columnToSortIndex;
072:            }
073:
074:            /**
075:             * Gets the previouslySortedColumnIndex attribute. 
076:             * @return Returns the previouslySortedColumnIndex.
077:             */
078:            public int getPreviouslySortedColumnIndex() {
079:                return previouslySortedColumnIndex;
080:            }
081:
082:            /**
083:             * Sets the previouslySortedColumnIndex attribute value.
084:             * @param previouslySortedColumnIndex The previouslySortedColumnIndex to set.
085:             */
086:            public void setPreviouslySortedColumnIndex(
087:                    int previouslySortedColumnIndex) {
088:                this .previouslySortedColumnIndex = previouslySortedColumnIndex;
089:            }
090:
091:            /**
092:             * Gets the resultsActualSize attribute. 
093:             * @return Returns the resultsActualSize.
094:             */
095:            public int getResultsActualSize() {
096:                return resultsActualSize;
097:            }
098:
099:            /**
100:             * Sets the resultsActualSize attribute value.
101:             * @param resultsActualSize The resultsActualSize to set.
102:             */
103:            public void setResultsActualSize(int resultsActualSize) {
104:                this .resultsActualSize = resultsActualSize;
105:            }
106:
107:            /**
108:             * Gets the resultsLimitedSize attribute. 
109:             * @return Returns the resultsLimitedSize.
110:             */
111:            public int getResultsLimitedSize() {
112:                return resultsLimitedSize;
113:            }
114:
115:            /**
116:             * Sets the resultsLimitedSize attribute value.
117:             * @param resultsLimitedSize The resultsLimitedSize to set.
118:             */
119:            public void setResultsLimitedSize(int resultsLimitedSize) {
120:                this .resultsLimitedSize = resultsLimitedSize;
121:            }
122:
123:            /**
124:             * Gets the switchToPageNumber attribute. 
125:             * @return Returns the switchToPageNumber.
126:             */
127:            public int getSwitchToPageNumber() {
128:                return switchToPageNumber;
129:            }
130:
131:            /**
132:             * Sets the switchToPageNumber attribute value.
133:             * @param switchToPageNumber The switchToPageNumber to set.
134:             */
135:            public void setSwitchToPageNumber(int switchToPageNumber) {
136:                this .switchToPageNumber = switchToPageNumber;
137:            }
138:
139:            /**
140:             * Gets the viewedPageNumber attribute. 
141:             * @return Returns the viewedPageNumber.
142:             */
143:            public int getViewedPageNumber() {
144:                return viewedPageNumber;
145:            }
146:
147:            /**
148:             * Sets the viewedPageNumber attribute value.
149:             * @param viewedPageNumber The viewedPageNumber to set.
150:             */
151:            public void setViewedPageNumber(int viewedPageNumber) {
152:                this .viewedPageNumber = viewedPageNumber;
153:            }
154:
155:            /**
156:             * Gets the totalNumberOfPages attribute. 
157:             * @return Returns the totalNumberOfPages.
158:             */
159:            public int getTotalNumberOfPages() {
160:                return totalNumberOfPages;
161:            }
162:
163:            /**
164:             * Sets the totalNumberOfPages attribute value.
165:             * @param totalNumberOfPages The totalNumberOfPages to set.
166:             */
167:            public void setTotalNumberOfPages(int totalNumberOfPages) {
168:                this .totalNumberOfPages = totalNumberOfPages;
169:            }
170:
171:            /**
172:             * Gets the firstRowIndex attribute. 
173:             * @return Returns the firstRowIndex.
174:             */
175:            public int getFirstRowIndex() {
176:                return firstRowIndex;
177:            }
178:
179:            /**
180:             * Sets the firstRowIndex attribute value.
181:             * @param firstRowIndex The firstRowIndex to set.
182:             */
183:            public void setFirstRowIndex(int firstRowIndex) {
184:                this .firstRowIndex = firstRowIndex;
185:            }
186:
187:            /**
188:             * Gets the lastRowIndex attribute. 
189:             * @return Returns the lastRowIndex.
190:             */
191:            public int getLastRowIndex() {
192:                return lastRowIndex;
193:            }
194:
195:            /**
196:             * Sets the lastRowIndex attribute value.
197:             * @param lastRowIndex The lastRowIndex to set.
198:             */
199:            public void setLastRowIndex(int lastRowIndex) {
200:                this .lastRowIndex = lastRowIndex;
201:            }
202:
203:            /**
204:             * Gets the sortDescending attribute. 
205:             * @return Returns the sortDescending.
206:             */
207:            public boolean isSortDescending() {
208:                return sortDescending;
209:            }
210:
211:            /**
212:             * Sets the sortDescending attribute value.
213:             * @param sortDescending The sortDescending to set.
214:             */
215:            public void setSortDescending(boolean sortDescending) {
216:                this .sortDescending = sortDescending;
217:            }
218:
219:            /**
220:             * Sets the paging form parameters to go to the first page of the list
221:             * 
222:             * @param listSize size of table being rendered
223:             * @param maxRowsPerPage
224:             */
225:            public void jumpToFirstPage(int listSize, int maxRowsPerPage) {
226:                jumpToPage(0, listSize, maxRowsPerPage);
227:            }
228:
229:            /**
230:             * Sets the paging form parameters to go to the last page of the list
231:             * 
232:             * @param listSize size of table being rendered
233:             * @param maxRowsPerPage
234:             */
235:            public void jumpToLastPage(int listSize, int maxRowsPerPage) {
236:                jumpToPage(TableRenderUtil.computeTotalNumberOfPages(listSize,
237:                        maxRowsPerPage) - 1, listSize, maxRowsPerPage);
238:            }
239:
240:            /**
241:             * Sets the paging form parameters to go to the specified page of the list
242:             * 
243:             * @param pageNumber first page is 0, must be non-negative.  If the list is not large enough to have the page specified, then
244:             *   this method will be equivalent to calling jumpToLastPage.
245:             * @param listSize size of table being rendered
246:             * @param maxRowsPerPage
247:             * 
248:             * @see KualiTableRenderFormMetadata#jumpToLastPage(int, int)
249:             */
250:            public void jumpToPage(int pageNumber, int listSize,
251:                    int maxRowsPerPage) {
252:                int totalPages = TableRenderUtil.computeTotalNumberOfPages(
253:                        listSize, maxRowsPerPage);
254:                setTotalNumberOfPages(totalPages);
255:                if (pageNumber >= totalPages) {
256:                    pageNumber = totalPages - 1;
257:                }
258:                setViewedPageNumber(pageNumber);
259:                setFirstRowIndex(TableRenderUtil.computeStartIndexForPage(
260:                        pageNumber, listSize, maxRowsPerPage));
261:                setLastRowIndex(TableRenderUtil.computeLastIndexForPage(
262:                        pageNumber, listSize, maxRowsPerPage));
263:            }
264:
265:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.