Source Code Cross Referenced for ConfigLabelProvider.java in  » Net » Terracotta » org » terracotta » dso » views » 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 » Net » Terracotta » org.terracotta.dso.views 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package org.terracotta.dso.views;
02:
03:        import org.eclipse.jdt.core.IJavaElement;
04:        import org.eclipse.jdt.ui.JavaElementLabelProvider;
05:        import org.eclipse.jface.viewers.LabelProvider;
06:        import org.eclipse.swt.graphics.Image;
07:        import org.terracotta.dso.TcPlugin;
08:
09:        class ConfigLabelProvider extends LabelProvider {
10:            private ConfigViewer fViewer;
11:            private static Image m_rootsImage;
12:            private static Image m_bootClassesImage;
13:            private static Image m_distributedMethodsImage;
14:            private static Image m_instrumentedClassesImage;
15:            private static Image m_locksImage;
16:            private static Image m_transientsImage;
17:            private static Image m_missingElementImage;
18:
19:            private static JavaElementLabelProvider m_javaLabelProvider = new JavaElementLabelProvider(
20:                    JavaElementLabelProvider.SHOW_SMALL_ICONS);
21:
22:            static {
23:                m_rootsImage = TcPlugin
24:                        .createImage("/images/eclipse/roots.gif");
25:                m_locksImage = TcPlugin
26:                        .createImage("/images/eclipse/locks.gif");
27:                m_transientsImage = TcPlugin
28:                        .createImage("/images/eclipse/transients.gif");
29:                m_bootClassesImage = TcPlugin
30:                        .createImage("/images/eclipse/jar_obj.gif");
31:                m_distributedMethodsImage = TcPlugin
32:                        .createImage("/images/eclipse/jmeth_obj.gif");
33:                m_instrumentedClassesImage = TcPlugin
34:                        .createImage("/images/eclipse/class_obj.gif");
35:                m_missingElementImage = TcPlugin
36:                        .createImage("/images/eclipse/hprio_tsk.gif");
37:            }
38:
39:            ConfigLabelProvider(ConfigViewer viewer) {
40:                super ();
41:                fViewer = viewer;
42:            }
43:
44:            public String getText(Object element) {
45:                if (element instanceof  RootsWrapper) {
46:                    return "Roots";
47:                } else if (element instanceof  InstrumentedClassesWrapper) {
48:                    return "Instrumented classes";
49:                } else if (element instanceof  LocksWrapper) {
50:                    return "Locks";
51:                } else if (element instanceof  DistributedMethodsWrapper) {
52:                    return "Distributed methods";
53:                } else if (element instanceof  AdditionalBootJarClassesWrapper) {
54:                    return "Additional boot classes";
55:                } else if (element instanceof  TransientFieldsWrapper) {
56:                    return "Transient fields";
57:                }
58:                return super .getText(element);
59:            }
60:
61:            public Image getImage(Object element) {
62:                if (element instanceof  RootWrapper) {
63:                    RootWrapper wrapper = (RootWrapper) element;
64:                    return getJavaElementImage(fViewer.getPart().getField(
65:                            wrapper.getFieldName()));
66:                } else if (element instanceof  RootsWrapper) {
67:                    return m_rootsImage;
68:                } else if (element instanceof  LocksWrapper) {
69:                    return m_locksImage;
70:                } else if (element instanceof  DistributedMethodsWrapper) {
71:                    return m_distributedMethodsImage;
72:                } else if (element instanceof  AdditionalBootJarClassesWrapper) {
73:                    return m_bootClassesImage;
74:                } else if (element instanceof  TransientFieldsWrapper) {
75:                    return m_transientsImage;
76:                } else if (element instanceof  InstrumentedClassesWrapper) {
77:                    return m_instrumentedClassesImage;
78:                } else if (element instanceof  BootClassWrapper) {
79:                    String className = ((BootClassWrapper) element)
80:                            .getClassName();
81:                    return getJavaElementImage(fViewer.getPart().getType(
82:                            className));
83:                } else if (element instanceof  TransientFieldWrapper) {
84:                    String fieldName = ((TransientFieldWrapper) element)
85:                            .getFieldName();
86:                    return getJavaElementImage(fViewer.getPart().getField(
87:                            fieldName));
88:                }
89:
90:                return null;
91:            }
92:
93:            private Image getJavaElementImage(IJavaElement element) {
94:                if (element != null) {
95:                    return m_javaLabelProvider.getImage(element);
96:                }
97:                return m_missingElementImage;
98:            }
99:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.