Source Code Cross Referenced for CompItem.java in  » Testing » jacareto » jacareto » comp » 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 » jacareto » jacareto.comp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Jacareto Copyright (c) 2002-2005
003:         * Applied Computer Science Research Group, Darmstadt University of
004:         * Technology, Institute of Mathematics & Computer Science,
005:         * Ludwigsburg University of Education, and Computer Based
006:         * Learning Research Group, Aachen University. All rights reserved.
007:         *
008:         * Jacareto is free software; you can redistribute it and/or
009:         * modify it under the terms of the GNU General Public
010:         * License as published by the Free Software Foundation; either
011:         * version 2 of the License, or (at your option) any later version.
012:         *
013:         * Jacareto is distributed in the hope that it will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
016:         * General Public License for more details.
017:         *
018:         * You should have received a copy of the GNU General Public
019:         * License along with Jacareto; if not, write to the Free
020:         * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021:         *
022:         */
023:
024:        package jacareto.comp;
025:
026:        import jacareto.system.Environment;
027:        import jacareto.system.EnvironmentMember;
028:
029:        import java.awt.Component;
030:
031:        /**
032:         * <p>
033:         * A item of the components instance. Represents a known, not ignored component.
034:         * </p>
035:         *
036:         * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a> (Version 1.1)
037:         * @version 1.1
038:         */
039:        class CompItem extends EnvironmentMember {
040:            /** The corresponding component. */
041:            private Component component;
042:
043:            /** The name of the component. */
044:            private String name;
045:
046:            /** Whether or not this comp item is enabled for capturing. */
047:            private boolean isEnabled;
048:
049:            /** Whether or not the component should never be enabled. */
050:            private boolean isAlwaysDisabled;
051:
052:            /** Whether this comp item is visible or not. */
053:            private boolean isVisible;
054:
055:            /** The children count. */
056:            private int childrenCount;
057:
058:            /** The children. */
059:            private Component[] children;
060:
061:            /**
062:             * Creates a new components item. The comp item is enabled by default. The children count is 0
063:             * at the beginning, the comp item is nor ignored. The comp item is visible if and only if the
064:             * component is visible.
065:             *
066:             * @param env the environment.
067:             * @param component the corresponding component
068:             * @param name the name of the component
069:             */
070:            public CompItem(Environment env, Component component, String name) {
071:                super (env);
072:                this .component = component;
073:                this .name = name;
074:                setEnabled(true);
075:                setAlwaysDisabled(false);
076:                setVisible(component.isVisible());
077:                setChildrenCount(0);
078:            }
079:
080:            /**
081:             * Returns the corresponding component.
082:             *
083:             * @return DOCUMENT ME!
084:             */
085:            public Component getComponent() {
086:                return component;
087:            }
088:
089:            /**
090:             * Returns the name of the component.
091:             *
092:             * @return DOCUMENT ME!
093:             */
094:            public String getName() {
095:                return name;
096:            }
097:
098:            /**
099:             * Specifies that the component should always be disabled.
100:             *
101:             * @param isAlwaysDisabled DOCUMENT ME!
102:             */
103:            public void setAlwaysDisabled(boolean isAlwaysDisabled) {
104:                this .isAlwaysDisabled = isAlwaysDisabled;
105:            }
106:
107:            /**
108:             * Specifies whether or not the comp item is enabled  for capturing. If the component is always
109:             * disabled, this method does nothing; the component keeps being disabled.
110:             *
111:             * @param isEnabled <code>true</code> if the comp item is enabled, otherwise <code>false</code>
112:             */
113:            public void setEnabled(boolean isEnabled) {
114:                this .isEnabled = (!isAlwaysDisabled) && isEnabled;
115:            }
116:
117:            /**
118:             * Returns whether or not the component is enabled.
119:             *
120:             * @return DOCUMENT ME!
121:             */
122:            public boolean isEnabled() {
123:                return isEnabled;
124:            }
125:
126:            /**
127:             * Returns whether or not the comp item is visible.
128:             *
129:             * @return DOCUMENT ME!
130:             */
131:            public boolean isVisible() {
132:                return isVisible;
133:            }
134:
135:            /**
136:             * Specifies whether or not the comp item is visible.
137:             *
138:             * @param isVisible <code>true</code> if the comp item is visible, otherwise <code>false</code>
139:             */
140:            public void setVisible(boolean isVisible) {
141:                this .isVisible = isVisible;
142:            }
143:
144:            /**
145:             * Sets the children count for this component item.
146:             *
147:             * @param childrenCount the children count
148:             */
149:            public void setChildrenCount(int childrenCount) {
150:                this .childrenCount = childrenCount;
151:            }
152:
153:            /**
154:             * Returns the children count.
155:             *
156:             * @return DOCUMENT ME!
157:             */
158:            public int getChildrenCount() {
159:                return childrenCount;
160:            }
161:
162:            /**
163:             * Sets the children.
164:             *
165:             * @param children DOCUMENT ME!
166:             */
167:            public void setChildren(Component[] children) {
168:                this .children = children;
169:            }
170:
171:            /**
172:             * Returns the children.
173:             *
174:             * @return DOCUMENT ME!
175:             */
176:            public Component[] getChildren() {
177:                return children;
178:            }
179:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.