Source Code Cross Referenced for GridEventsSample.java in  » Ajax » gwtext-2.01 » com » gwtext » sample » showcase2 » client » grid » 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 » Ajax » gwtext 2.01 » com.gwtext.sample.showcase2.client.grid 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:        package com.gwtext.sample.showcase2.client.grid;
009:
010:        import com.gwtext.client.core.EventObject;
011:        import com.gwtext.client.util.Format;
012:        import com.gwtext.client.widgets.Panel;
013:        import com.gwtext.client.widgets.grid.GridPanel;
014:        import com.gwtext.client.widgets.grid.event.*;
015:        import com.gwtext.sample.showcase2.client.SampleGrid;
016:        import com.gwtext.sample.showcase2.client.ShowcasePanel;
017:
018:        public class GridEventsSample extends ShowcasePanel {
019:
020:            public String getSourceUrl() {
021:                return "source/grid/GridEventsSample.java.html";
022:            }
023:
024:            public Panel getViewPanel() {
025:                if (panel == null) {
026:                    panel = new Panel();
027:
028:                    GridPanel grid = new SampleGrid(true);
029:                    grid.setTitle("Grid Events");
030:                    grid.setHeight(350);
031:                    grid.setWidth(600);
032:
033:                    grid.addGridCellListener(new GridCellListener() {
034:                        public void onCellClick(GridPanel grid, int rowIndex,
035:                                int colindex, EventObject e) {
036:                            log(EVENT, "GridCellListener.onCellClick::row("
037:                                    + rowIndex + "), col(" + colindex + ");");
038:                        }
039:
040:                        public void onCellContextMenu(GridPanel grid,
041:                                int rowIndex, int colIndex, EventObject e) {
042:                            log(EVENT,
043:                                    "GridCellListener.onCellContextMenu::row("
044:                                            + rowIndex + "), col(" + colIndex
045:                                            + ");");
046:                        }
047:
048:                        public void onCellDblClick(GridPanel grid,
049:                                int rowIndex, int colIndex, EventObject e) {
050:                            log(EVENT, "GridCellListener.onCellDblClick::row("
051:                                    + rowIndex + "), col(" + colIndex + ");");
052:                        }
053:                    });
054:
055:                    grid.addGridColumnListener(new GridColumnListener() {
056:                        public void onColumnMove(GridPanel grid, int oldIndex,
057:                                int newIndex) {
058:                            log(
059:                                    EVENT,
060:                                    Format
061:                                            .format(
062:                                                    "GridCellListener.onColumnMove::oldIndex({0}), newIndex({1})",
063:                                                    oldIndex, newIndex));
064:                        }
065:
066:                        public void onColumnResize(GridPanel grid,
067:                                int colIndex, int newSize) {
068:                            log(
069:                                    EVENT,
070:                                    Format
071:                                            .format(
072:                                                    "GridCellListener.onColumnResize::oldIndex({0}), newSize({1})",
073:                                                    colIndex, newSize));
074:                        }
075:                    });
076:
077:                    grid.addGridHeaderListener(new GridHeaderListener() {
078:                        public void onHeaderClick(GridPanel grid, int colIndex,
079:                                EventObject e) {
080:                            log(
081:                                    EVENT,
082:                                    Format
083:                                            .format(
084:                                                    "GridHeaderListener.onHeaderClick::colIndex({0}))",
085:                                                    colIndex));
086:                        }
087:
088:                        public void onHeaderContextMenu(GridPanel grid,
089:                                int colIndex, EventObject e) {
090:                            log(
091:                                    EVENT,
092:                                    Format
093:                                            .format(
094:                                                    "GridHeaderListener.onHeaderContextMenu::colIndex({0}))",
095:                                                    colIndex));
096:                        }
097:
098:                        public void onHeaderDblClick(GridPanel grid,
099:                                int colIndex, EventObject e) {
100:                            log(
101:                                    EVENT,
102:                                    Format
103:                                            .format(
104:                                                    "GridHeaderListener.onHeaderDblClick::colIndex({0}))",
105:                                                    colIndex));
106:                        }
107:                    });
108:
109:                    grid.addGridListener(new GridListener() {
110:                        public void onBodyScroll(int scrollLeft, int scrollTop) {
111:                            log(
112:                                    EVENT,
113:                                    Format
114:                                            .format(
115:                                                    "GridListener.onBodyScroll::scrollLeft({0}, scrollTop({1})))",
116:                                                    scrollLeft, scrollTop));
117:                        }
118:
119:                        public void onClick(EventObject e) {
120:                            log(EVENT, "GridListener.onClick");
121:                        }
122:
123:                        public void onContextMenu(EventObject e) {
124:                            log(EVENT, "GridListener.onContextMenu");
125:                        }
126:
127:                        public void onDblClick(EventObject e) {
128:                            log(EVENT, "GridListener.onDblClick");
129:                        }
130:
131:                        public void onKeyDown(EventObject e) {
132:                            log(EVENT, "GridListener.onKeyDown");
133:                        }
134:
135:                        public void onKeyPress(EventObject e) {
136:                            log(EVENT, "GridListener.onKeyPress");
137:                        }
138:                    });
139:
140:                    grid.addGridRowListener(new GridRowListener() {
141:                        public void onRowClick(GridPanel grid, int rowIndex,
142:                                EventObject e) {
143:                            log(
144:                                    EVENT,
145:                                    Format
146:                                            .format(
147:                                                    "GridRowListener.onRowClick::rowIndex({0})",
148:                                                    rowIndex));
149:                        }
150:
151:                        public void onRowDblClick(GridPanel grid, int rowIndex,
152:                                EventObject e) {
153:                            log(
154:                                    EVENT,
155:                                    Format
156:                                            .format(
157:                                                    "GridRowListener.onRowDblClick::rowIndex({0})",
158:                                                    rowIndex));
159:                        }
160:
161:                        public void onRowContextMenu(GridPanel grid,
162:                                int rowIndex, EventObject e) {
163:                            log(
164:                                    EVENT,
165:                                    Format
166:                                            .format(
167:                                                    "GridRowListener.onRowContextMenu::rowIndex({0}), x({1}), y({2})",
168:                                                    rowIndex, e.getPageX(), e
169:                                                            .getPageY()));
170:                        }
171:                    });
172:
173:                    panel.add(grid);
174:                }
175:                return panel;
176:            }
177:
178:            protected boolean showEvents() {
179:                return true;
180:            }
181:
182:            public String getIntro() {
183:                return "This example illustrates various events that a Grid fires.";
184:            }
185:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.