Source Code Cross Referenced for Tests.java in  » Testing » jtestcase » org » jtestcase » core » 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 » Testing » jtestcase » org.jtestcase.core.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * 
003:         */package org.jtestcase.core.model;
004:
005:        import java.util.ArrayList;
006:        import java.util.List;
007:
008:        import org.jtestcase.plugin.guimodel.intf.IUINode;
009:        import org.jtestcase.plugin.guimodel.intf.IUINodeSupport;
010:
011:        /**
012:         * @author fausto
013:         * 
014:         */
015:        public class Tests implements  IUINode {
016:
017:            /**
018:             * The list of nested instances in the param
019:             */
020:            private List nestedClasses;
021:
022:            private IUINodeSupport uiSupport = null;
023:
024:            private boolean isGUIsupported = false;
025:
026:            public Tests() {
027:                nestedClasses = new ArrayList();
028:                instantiateUISupport();
029:            }
030:
031:            public void addClass(TestClass testClass) {
032:                nestedClasses.add(testClass);
033:                if (isGUIsupported())
034:                    uiSupport.add((IUINode) testClass);
035:            }
036:
037:            private void instantiateUISupport() {
038:                try {
039:                    uiSupport = (IUINodeSupport) Class.forName(
040:                            IUINodeSupport.IMPL).newInstance();
041:                    uiSupport.setNode(this );
042:                    setGUIsupported(true);
043:                } catch (InstantiationException e) {
044:                    // TODO Auto-generated catch block
045:                    System.err.println("WARN : NOT USING UI SUPPORT");
046:                    // e.printStackTrace();
047:                } catch (IllegalAccessException e) {
048:                    // TODO Auto-generated catch block
049:                    System.err.println("WARN : NOT USING UI SUPPORT");
050:                    // e.printStackTrace();
051:                } catch (ClassNotFoundException e) {
052:                    // TODO Auto-generated catch block
053:                    System.err.println("WARN : NOT USING UI SUPPORT");
054:                    // e.printStackTrace();
055:                }
056:            }
057:
058:            /*
059:             * (non-Javadoc)
060:             * 
061:             * @see treemodel.intf.IUINode#getNodes()
062:             */
063:            public List getNodes() {
064:                // TODO Auto-generated method stub
065:                return uiSupport.getNodes();
066:            }
067:
068:            /*
069:             * (non-Javadoc)
070:             * 
071:             * @see treemodel.intf.IUINode#remove(treemodel.intf.IUINode)
072:             */
073:            public void remove(IUINode toRemove) {
074:                uiSupport.remove(toRemove);
075:            }
076:
077:            /*
078:             * (non-Javadoc)
079:             * 
080:             * @see treemodel.intf.IUINode#add(treemodel.intf.IUINode)
081:             */
082:            public void add(IUINode toAdd) {
083:                // TODO Auto-generated method stub
084:                // call business delegate method
085:                addClass((TestClass) toAdd);
086:            }
087:
088:            /*
089:             * (non-Javadoc)
090:             * 
091:             * @see treemodel.intf.IUINode#getNode()
092:             */
093:            public IUINode getNode() {
094:                // TODO Auto-generated method stub
095:                return uiSupport.getNode();
096:            }
097:
098:            /*
099:             * (non-Javadoc)
100:             * 
101:             * @see treemodel.intf.IUINode#getNodeLabel()
102:             */
103:            public String getNodeLabel() {
104:                // TODO Auto-generated method stub
105:                return "tests";
106:            }
107:
108:            /*
109:             * (non-Javadoc)
110:             * 
111:             * @see treemodel.intf.IUINode#getNodeImage()
112:             */
113:            public String getNodeImage() {
114:                // TODO Auto-generated method stub
115:                return "book.gif";
116:            }
117:
118:            /*
119:             * (non-Javadoc)
120:             * 
121:             * @see treemodel.intf.IUINode#size()
122:             */
123:            public int size() {
124:                // TODO Auto-generated method stub
125:                return uiSupport.size();
126:            }
127:
128:            /*
129:             * (non-Javadoc)
130:             * 
131:             * @see treemodel.intf.IUINode#getUISupport()
132:             */
133:            public Object getUISupport() {
134:                // TODO Auto-generated method stub
135:                return uiSupport;
136:            }
137:
138:            public boolean isGUIsupported() {
139:                return isGUIsupported;
140:            }
141:
142:            public void setGUIsupported(boolean isGUIsupported) {
143:                this.isGUIsupported = isGUIsupported;
144:            }
145:
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.