Source Code Cross Referenced for ComponentMode.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.record.Recordable;
027:        import jacareto.system.Environment;
028:
029:        import java.util.Collection;
030:        import java.util.Vector;
031:
032:        /**
033:         * This class represents the component mode.
034:         *
035:         * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
036:         * @version 1.0
037:         */
038:        public class ComponentMode extends Recordable {
039:            /** Whether or not new dialogs should be set to modal. */
040:            private boolean newDialogsModal;
041:
042:            /** Whether or not the new dialogs modal property should be applied. */
043:            private boolean applyNewDialogsModal;
044:
045:            /** The vector which contains the names for renaming new roots. */
046:            private Vector newRootNames;
047:
048:            /** Whether or not popup menues should be numbered. */
049:            private boolean numberPopupMenues;
050:
051:            /**
052:             * Creates a new instance with the given values.
053:             *
054:             * @param env the environment
055:             * @param newDialogsModal whether or not new dialogs should be set to modal
056:             * @param applyNewDialogsModal whether or not the new dialogs modal property should be applied
057:             * @param numberPopupMenues DOCUMENT ME!
058:             * @param newRootNames the vector with the new root names
059:             */
060:            public ComponentMode(Environment env, boolean newDialogsModal,
061:                    boolean applyNewDialogsModal, boolean numberPopupMenues,
062:                    Vector newRootNames) {
063:                super (env);
064:                setNewDialogsModal(newDialogsModal);
065:                setApplyNewDialogsModal(applyNewDialogsModal);
066:                setNumberPopupMenues(numberPopupMenues);
067:                this .newRootNames = newRootNames;
068:            }
069:
070:            /**
071:             * Creates a new instance with the given values.
072:             *
073:             * @param env the environment
074:             * @param newDialogsModal whether or not new dialogs should be set to modal
075:             * @param applyNewDialogsModal whether or not the new dialogs modal property should be applied
076:             * @param numberPopupMenues DOCUMENT ME!
077:             */
078:            public ComponentMode(Environment env, boolean newDialogsModal,
079:                    boolean applyNewDialogsModal, boolean numberPopupMenues) {
080:                this (env, newDialogsModal, applyNewDialogsModal,
081:                        numberPopupMenues, new Vector(5, 5));
082:            }
083:
084:            /**
085:             * Creates a new user with default values.
086:             *
087:             * @param env the environment
088:             */
089:            public ComponentMode(Environment env) {
090:                this (env, false, false, true);
091:            }
092:
093:            /**
094:             * Creates an instance with default values and no environment. The environment should be
095:             * defined with the method {@link
096:             * jacareto.system.EnvironmentMember#setEnvironment(Environment)} before environment instances
097:             * will be accessed.
098:             */
099:            public ComponentMode() {
100:                this (null);
101:            }
102:
103:            /**
104:             * Sets the new dialog modal property.
105:             *
106:             * @param newDialogsModal whether or not new dialogs should be made modal
107:             */
108:            public void setNewDialogsModal(boolean newDialogsModal) {
109:                this .newDialogsModal = newDialogsModal;
110:                fireValuesChanged();
111:            }
112:
113:            /**
114:             * Returns the new dialog modal property.
115:             *
116:             * @return guess!
117:             */
118:            public boolean getNewDialogsModal() {
119:                return newDialogsModal;
120:            }
121:
122:            /**
123:             * Sets whether or not the dialog modal property should be applied
124:             *
125:             * @param applyNewDialogsModal whether or not the the property should be applied
126:             */
127:            public void setApplyNewDialogsModal(boolean applyNewDialogsModal) {
128:                this .applyNewDialogsModal = applyNewDialogsModal;
129:                fireValuesChanged();
130:            }
131:
132:            /**
133:             * Returns  whether or not the dialog modal property should be applied
134:             *
135:             * @return guess!
136:             */
137:            public boolean getApplyNewDialogsModal() {
138:                return applyNewDialogsModal;
139:            }
140:
141:            /**
142:             * Sets whether or not new popup menues should be numbered
143:             *
144:             * @param numberPopupMenues <code>true</code> if popup menues should be numbered, otherwise
145:             *        <code>false</code>
146:             */
147:            public void setNumberPopupMenues(boolean numberPopupMenues) {
148:                this .numberPopupMenues = numberPopupMenues;
149:                fireValuesChanged();
150:            }
151:
152:            /**
153:             * Returns whether or not the popup menues should be numbered should be applied
154:             *
155:             * @return guess!
156:             */
157:            public boolean getNumberPopupMenues() {
158:                return numberPopupMenues;
159:            }
160:
161:            /**
162:             * Adds names for renaming new roots.
163:             *
164:             * @param names the names to be added
165:             */
166:            public void addNewRootNames(Collection names) {
167:                newRootNames.addAll(names);
168:                fireValuesChanged();
169:            }
170:
171:            /**
172:             * Returns whether or not a new root name is contained.
173:             *
174:             * @return <code>true</code> if there is a new root name, otherwise <code>false</code>
175:             */
176:            public boolean containsNewRootName() {
177:                return !newRootNames.isEmpty();
178:            }
179:
180:            /**
181:             * Adds a new root name.
182:             *
183:             * @param name the new name
184:             */
185:            public void addNewRootName(String name) {
186:                newRootNames.add(name);
187:                fireValuesChanged();
188:            }
189:
190:            /**
191:             * Removes the new root name at the specified index.
192:             *
193:             * @param index the index of the name to be removed
194:             */
195:            public void removeNewRootName(int index) {
196:                if ((0 <= index) && (index < newRootNames.size())) {
197:                    newRootNames.remove(index);
198:                    fireValuesChanged();
199:                }
200:            }
201:
202:            /**
203:             * Clears the list of new root names.
204:             */
205:            public void clearNewRootNames() {
206:                newRootNames.clear();
207:                fireValuesChanged();
208:            }
209:
210:            /**
211:             * Returns a vector with the new root names.
212:             *
213:             * @return DOCUMENT ME!
214:             */
215:            public Vector getNewRootNames() {
216:                return newRootNames;
217:            }
218:
219:            /**
220:             * Returns the new root name at <code>index</code>.
221:             *
222:             * @param index the index
223:             *
224:             * @return the name
225:             */
226:            public String getNewRootName(int index) {
227:                return (String) newRootNames.get(index);
228:            }
229:
230:            /**
231:             * Returns the name of the recordable
232:             *
233:             * @return the name
234:             */
235:            public String getElementName() {
236:                return getLanguage().getString("Components.Mode.Name");
237:            }
238:
239:            /**
240:             * Returns a description of the recordable.
241:             *
242:             * @return the description
243:             */
244:            public String getElementDescription() {
245:                return getLanguage().getString("Components.Mode.Description");
246:            }
247:
248:            /**
249:             * Returns a String which describes the content of the recordable shortly.
250:             *
251:             * @return a string with a short description of the recordable
252:             */
253:            public String toShortString() {
254:                return getElementName();
255:            }
256:
257:            /**
258:             * Clones the element.
259:             *
260:             * @return a clone
261:             */
262:            public Object clone() {
263:                ComponentMode result = (ComponentMode) super .clone();
264:                result.newRootNames = new Vector(this .newRootNames);
265:
266:                return result;
267:            }
268:
269:            public boolean hasProcTime() {
270:                return false;
271:            }
272:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.