Source Code Cross Referenced for TableMap.java in  » Scripting » groovy-1.0 » groovy » inspect » swingui » 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 » Scripting » groovy 1.0 » groovy.inspect.swingui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package groovy.inspect.swingui;
002:
003:        /*
004:         * Copyright (c) 2003 Sun Microsystems, Inc. All  Rights Reserved.
005:         *
006:         * Redistribution and use in source and binary forms, with or without
007:         * modification, are permitted provided that the following conditions
008:         * are met:
009:         *
010:         * -Redistributions of source code must retain the above copyright
011:         *  notice, this list of conditions and the following disclaimer.
012:         *
013:         * -Redistribution in binary form must reproduct the above copyright
014:         *  notice, this list of conditions and the following disclaimer in
015:         *  the documentation and/or other materials provided with the distribution.
016:         *
017:         * Neither the name of Sun Microsystems, Inc. or the names of contributors
018:         * may be used to endorse or promote products derived from this software
019:         * without specific prior written permission.
020:         *
021:         * This software is provided "AS IS," without a warranty of any kind. ALL
022:         * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
023:         * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
024:         * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT
025:         * BE LIABLE FOR ANY DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT
026:         * OF OR RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS
027:         * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
028:         * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
029:         * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
030:         * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN
031:         * IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
032:         *
033:         * You acknowledge that Software is not designed, licensed or intended for
034:         * use in the design, construction, operation or maintenance of any nuclear
035:         * facility.
036:         */
037:
038:        /*
039:         * @(#)TableMap.java	1.11 03/01/23
040:         */
041:
042:        /**
043:         * In a chain of data manipulators some behaviour is common. TableMap
044:         * provides most of this behavour and can be subclassed by filters
045:         * that only need to override a handful of specific methods. TableMap
046:         * implements TableModel by routing all requests to its model, and
047:         * TableModelListener by routing all events to its listeners. Inserting
048:         * a TableMap which has not been subclassed into a chain of table filters
049:         * should have no effect.
050:         *
051:         * @version 1.11 01/23/03
052:         * @author Philip Milne */
053:
054:        import javax.swing.table.*;
055:        import javax.swing.event.TableModelListener;
056:        import javax.swing.event.TableModelEvent;
057:
058:        public class TableMap extends AbstractTableModel implements 
059:                TableModelListener {
060:            protected TableModel model;
061:
062:            public TableModel getModel() {
063:                return model;
064:            }
065:
066:            public void setModel(TableModel model) {
067:                this .model = model;
068:                model.addTableModelListener(this );
069:            }
070:
071:            // By default, Implement TableModel by forwarding all messages
072:            // to the model.
073:
074:            public Object getValueAt(int aRow, int aColumn) {
075:                return model.getValueAt(aRow, aColumn);
076:            }
077:
078:            public void setValueAt(Object aValue, int aRow, int aColumn) {
079:                model.setValueAt(aValue, aRow, aColumn);
080:            }
081:
082:            public int getRowCount() {
083:                return (model == null) ? 0 : model.getRowCount();
084:            }
085:
086:            public int getColumnCount() {
087:                return (model == null) ? 0 : model.getColumnCount();
088:            }
089:
090:            public String getColumnName(int aColumn) {
091:                return model.getColumnName(aColumn);
092:            }
093:
094:            public Class getColumnClass(int aColumn) {
095:                return model.getColumnClass(aColumn);
096:            }
097:
098:            public boolean isCellEditable(int row, int column) {
099:                return model.isCellEditable(row, column);
100:            }
101:
102:            //
103:            // Implementation of the TableModelListener interface,
104:            //
105:
106:            // By default forward all events to all the listeners.
107:            public void tableChanged(TableModelEvent e) {
108:                fireTableChanged(e);
109:            }
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.