Source Code Cross Referenced for JDirectoryChooserBeanInfo.java in  » Swing-Library » l2fprod-common » com » l2fprod » common » swing » 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 » Swing Library » l2fprod common » com.l2fprod.common.swing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Generated file - Do not edit!
003:         */
004:        package com.l2fprod.common.swing;
005:
006:        import java.awt.Image;
007:        import java.beans.BeanDescriptor;
008:        import java.beans.BeanInfo;
009:        import java.beans.IntrospectionException;
010:        import java.beans.Introspector;
011:        import java.beans.MethodDescriptor;
012:        import java.beans.PropertyDescriptor;
013:        import java.beans.SimpleBeanInfo;
014:        import java.util.Vector;
015:
016:        /**
017:         * BeanInfo class for JDirectoryChooser.
018:         */
019:        public class JDirectoryChooserBeanInfo extends SimpleBeanInfo {
020:
021:            /** Description of the Field */
022:            protected BeanDescriptor bd = new BeanDescriptor(
023:                    com.l2fprod.common.swing.JDirectoryChooser.class);
024:            /** Description of the Field */
025:            protected Image iconMono16 = loadImage("JDirectoryChooser16-mono.gif");
026:            /** Description of the Field */
027:            protected Image iconColor16 = loadImage("JDirectoryChooser16.gif");
028:            /** Description of the Field */
029:            protected Image iconMono32 = loadImage("JDirectoryChooser32-mono.gif");
030:            /** Description of the Field */
031:            protected Image iconColor32 = loadImage("JDirectoryChooser32.gif");
032:
033:            /** Constructor for the JDirectoryChooserBeanInfo object */
034:            public JDirectoryChooserBeanInfo()
035:                    throws java.beans.IntrospectionException {
036:                // setup bean descriptor in constructor.
037:                bd.setName("JDirectoryChooser");
038:
039:                bd.setShortDescription("JDirectoryChooser allows "
040:                        + "to select one or more directories.");
041:
042:                BeanInfo info = Introspector.getBeanInfo(getBeanDescriptor()
043:                        .getBeanClass().getSuperclass());
044:                String order = info.getBeanDescriptor().getValue(
045:                        "propertyorder") == null ? "" : (String) info
046:                        .getBeanDescriptor().getValue("propertyorder");
047:                PropertyDescriptor[] pd = getPropertyDescriptors();
048:                for (int i = 0; i != pd.length; i++) {
049:                    if (order.indexOf(pd[i].getName()) == -1) {
050:                        order = order + (order.length() == 0 ? "" : ":")
051:                                + pd[i].getName();
052:                    }
053:                }
054:                getBeanDescriptor().setValue("propertyorder", order);
055:            }
056:
057:            /**
058:             * Gets the additionalBeanInfo
059:             * 
060:             * @return The additionalBeanInfo value
061:             */
062:            public BeanInfo[] getAdditionalBeanInfo() {
063:                Vector bi = new Vector();
064:                BeanInfo[] biarr = null;
065:                try {
066:                    for (Class cl = com.l2fprod.common.swing.JDirectoryChooser.class
067:                            .getSuperclass(); !cl
068:                            .equals(javax.swing.JFileChooser.class
069:                                    .getSuperclass()); cl = cl.getSuperclass()) {
070:                        bi.addElement(Introspector.getBeanInfo(cl));
071:                    }
072:                    biarr = new BeanInfo[bi.size()];
073:                    bi.copyInto(biarr);
074:                } catch (Exception e) {
075:                    // Ignore it
076:                }
077:                return biarr;
078:            }
079:
080:            /**
081:             * Gets the beanDescriptor
082:             * 
083:             * @return The beanDescriptor value
084:             */
085:            public BeanDescriptor getBeanDescriptor() {
086:                return bd;
087:            }
088:
089:            /**
090:             * Gets the defaultPropertyIndex
091:             * 
092:             * @return The defaultPropertyIndex value
093:             */
094:            public int getDefaultPropertyIndex() {
095:                String defName = "";
096:                if (defName.equals("")) {
097:                    return -1;
098:                }
099:                PropertyDescriptor[] pd = getPropertyDescriptors();
100:                for (int i = 0; i < pd.length; i++) {
101:                    if (pd[i].getName().equals(defName)) {
102:                        return i;
103:                    }
104:                }
105:                return -1;
106:            }
107:
108:            /**
109:             * Gets the icon
110:             * 
111:             * @param type
112:             *          Description of the Parameter
113:             * @return The icon value
114:             */
115:            public Image getIcon(int type) {
116:                if (type == BeanInfo.ICON_COLOR_16x16) {
117:                    return iconColor16;
118:                }
119:                if (type == BeanInfo.ICON_MONO_16x16) {
120:                    return iconMono16;
121:                }
122:                if (type == BeanInfo.ICON_COLOR_32x32) {
123:                    return iconColor32;
124:                }
125:                if (type == BeanInfo.ICON_MONO_32x32) {
126:                    return iconMono32;
127:                }
128:                return null;
129:            }
130:
131:            /**
132:             * Gets the Property Descriptors
133:             * 
134:             * @return The propertyDescriptors value
135:             */
136:            public PropertyDescriptor[] getPropertyDescriptors() {
137:                try {
138:                    Vector descriptors = new Vector();
139:                    PropertyDescriptor descriptor = null;
140:
141:                    try {
142:                        descriptor = new PropertyDescriptor(
143:                                "showingCreateDirectory",
144:                                JDirectoryChooser.class);
145:                    } catch (IntrospectionException e) {
146:                        descriptor = new PropertyDescriptor(
147:                                "showingCreateDirectory",
148:                                JDirectoryChooser.class,
149:                                "isShowingCreateDirectory", null);
150:                    }
151:
152:                    descriptor.setPreferred(true);
153:                    descriptor.setBound(true);
154:                    descriptors.add(descriptor);
155:
156:                    return (PropertyDescriptor[]) descriptors
157:                            .toArray(new PropertyDescriptor[descriptors.size()]);
158:                } catch (Exception e) {
159:                    // do not ignore, bomb politely so use has chance to discover what went
160:                    // wrong...
161:                    // I know that this is suboptimal solution, but swallowing silently is
162:                    // even worse... Propose better solution!
163:                    e.printStackTrace();
164:                }
165:                return null;
166:            }
167:
168:            /**
169:             * Gets the methodDescriptors attribute ...
170:             * 
171:             * @return The methodDescriptors value
172:             */
173:            public MethodDescriptor[] getMethodDescriptors() {
174:                return new MethodDescriptor[0];
175:            }
176:
177:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.