Source Code Cross Referenced for FlatfileDatabaseBeanInfo.java in  » IDE-Netbeans » etl.project » org » netbeans » modules » mashup » db » ui » model » 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 » IDE Netbeans » etl.project » org.netbeans.modules.mashup.db.ui.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *
003:         *          Copyright (c) 2005, SeeBeyond Technology Corporation,
004:         *          All Rights Reserved
005:         *
006:         *          This program, and all the routines referenced herein,
007:         *          are the proprietary properties and trade secrets of
008:         *          SEEBEYOND TECHNOLOGY CORPORATION.
009:         *
010:         *          Except as provided for by license agreement, this
011:         *          program shall not be duplicated, used, or disclosed
012:         *          without  written consent signed by an officer of
013:         *          SEEBEYOND TECHNOLOGY CORPORATION.
014:         *
015:         */
016:        package org.netbeans.modules.mashup.db.ui.model;
017:
018:        import java.beans.BeanDescriptor;
019:        import java.beans.EventSetDescriptor;
020:        import java.beans.IntrospectionException;
021:        import java.beans.MethodDescriptor;
022:        import java.beans.PropertyDescriptor;
023:        import java.beans.SimpleBeanInfo;
024:        import java.util.ArrayList;
025:        import java.util.List;
026:
027:        import net.java.hulp.i18n.Logger;
028:        import org.netbeans.modules.etl.logger.Localizer;
029:        import org.netbeans.modules.etl.logger.LogUtil;
030:
031:        /**
032:         * Exposes getters for flatfile database properties. TODO Extend this class to expose
033:         * setters for read-write property sheets (MutabledFlatfileDatabaseBeanInfo?)
034:         * 
035:         * @author Jonathan Giron
036:         * @version $Revision$
037:         */
038:        public class FlatfileDatabaseBeanInfo extends SimpleBeanInfo {
039:
040:            private static BeanDescriptor beanDescriptor = null;
041:            private static EventSetDescriptor[] eventSet = null;
042:            private static MethodDescriptor[] methods = null;
043:            private static PropertyDescriptor[] properties = null;
044:            private static transient final Logger mLogger = LogUtil
045:                    .getLogger(FlatfileDatabaseBeanInfo.class.getName());
046:            private static transient final Localizer mLoc = Localizer.get();
047:            private static int defaultPropertyIndex = -1; // GEN-BEGIN:Idx
048:            private static int defaultEventIndex = -1; // GEN-END:Idx
049:
050:            /**
051:             * Gets the bean's <code>BeanDescriptor</code>s.
052:             * 
053:             * @return BeanDescriptor describing the editable properties of this bean. May return
054:             *         null if the information should be obtained by automatic analysis.
055:             */
056:            public BeanDescriptor getBeanDescriptor() {
057:                if (beanDescriptor == null) {
058:                    beanDescriptor = new BeanDescriptor(FlatfileDatabase.class);
059:                }
060:
061:                return beanDescriptor;
062:            }
063:
064:            /**
065:             * Gets the bean's <code>PropertyDescriptor</code>s.
066:             * 
067:             * @return An array of PropertyDescriptors describing the editable properties
068:             *         supported by this bean. May return null if the information should be
069:             *         obtained by automatic analysis.
070:             *         <p>
071:             *         If a property is indexed, then its entry in the result array will belong to
072:             *         the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of
073:             *         getPropertyDescriptors can use "instanceof" to check if a given
074:             *         PropertyDescriptor is an IndexedPropertyDescriptor.
075:             */
076:            public PropertyDescriptor[] getPropertyDescriptors() {
077:                if (properties == null) {
078:                    List myProps = new ArrayList();
079:
080:                    try {
081:                        PropertyDescriptor pd = new PropertyDescriptor("name",
082:                                FlatfileDatabase.class, "getName", null); // NOI18N
083:                        String nbBundle1 = mLoc
084:                                .t("PRSR001: Flat file definition name");
085:                        String label = Localizer.parse(nbBundle1); // NOI18N
086:                        pd.setDisplayName(label);
087:                        myProps.add(pd);
088:                    } catch (IntrospectionException e) {
089:                    }
090:
091:                    try {
092:                        PropertyDescriptor pd = new PropertyDescriptor(
093:                                "description", FlatfileDatabase.class,
094:                                "getDescription", null); // NOI18N
095:                        String nbBundle2 = mLoc.t("PRSR001: Description");
096:                        String label = Localizer.parse(nbBundle2); // NOI18N
097:                        pd.setDisplayName(label);
098:                        myProps.add(pd);
099:                    } catch (IntrospectionException e) {
100:                    }
101:
102:                    properties = (PropertyDescriptor[]) myProps
103:                            .toArray(new PropertyDescriptor[myProps.size()]);
104:                }
105:
106:                return properties;
107:            }
108:
109:            /**
110:             * Gets the bean's <code>EventSetDescriptor</code>s.
111:             * 
112:             * @return An array of EventSetDescriptors describing the kinds of events fired by
113:             *         this bean. May return null if the information should be obtained by
114:             *         automatic analysis.
115:             */
116:            public EventSetDescriptor[] getEventSetDescriptors() {
117:                if (eventSet == null) {
118:                    eventSet = new EventSetDescriptor[0];
119:                }
120:                return eventSet;
121:            }
122:
123:            /**
124:             * Gets the bean's <code>MethodDescriptor</code>s.
125:             * 
126:             * @return An array of MethodDescriptors describing the methods implemented by this
127:             *         bean. May return null if the information should be obtained by automatic
128:             *         analysis.
129:             */
130:            public MethodDescriptor[] getMethodDescriptors() {
131:                if (methods == null) {
132:                    methods = new MethodDescriptor[0];
133:                }
134:
135:                return methods;
136:            }
137:
138:            /**
139:             * A bean may have a "default" property that is the property that will mostly commonly
140:             * be initially chosen for update by human's who are customizing the bean.
141:             * 
142:             * @return Index of default property in the PropertyDescriptor array returned by
143:             *         getPropertyDescriptors.
144:             *         <P>
145:             *         Returns -1 if there is no default property.
146:             */
147:            public int getDefaultPropertyIndex() {
148:                return defaultPropertyIndex;
149:            }
150:
151:            /**
152:             * A bean may have a "default" event that is the event that will mostly commonly be
153:             * used by human's when using the bean.
154:             * 
155:             * @return Index of default event in the EventSetDescriptor array returned by
156:             *         getEventSetDescriptors.
157:             *         <P>
158:             *         Returns -1 if there is no default event.
159:             */
160:            public int getDefaultEventIndex() {
161:                return defaultEventIndex;
162:            }
163:        }
ww__w._j__ava_2__s__.___co__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.