Source Code Cross Referenced for Client.java in  » IDE-Netbeans » java » ClientEditor » 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 » IDE Netbeans » java » ClientEditor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2007, Sun Microsystems, Inc.
003:         * All rights reserved.
004:         * 
005:         * Redistribution and use in source and binary forms, with or without 
006:         * modification, are permitted provided that the following conditions are met:
007:         * 
008:         *  * Redistributions of source code must retain the above copyright notice, 
009:         *    this list of conditions and the following disclaimer.
010:         *  * Redistributions in binary form must reproduce the above copyright 
011:         *    notice, this list of conditions and the following disclaimer in 
012:         *    the documentation and/or other materials provided with the distribution.
013:         *  * Neither the name of Sun Microsystems, Inc. nor the names of its 
014:         *    contributors may be used to endorse or promote products derived 
015:         *    from this software without specific prior written permission.
016:         *
017:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
018:         * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
019:         * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
020:         * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
021:         * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
022:         * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
023:         * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
024:         * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
025:         * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
026:         * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
027:         * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
028:         */
029:
030:        package clienteditor;
031:
032:        import java.beans.PropertyChangeListener;
033:        import java.beans.PropertyChangeSupport;
034:
035:        /**
036:         * Information about one clinet.
037:         * 
038:         * @author Jiri Vagner, Jan Stola
039:         */
040:        public class Client {
041:            /** First name of the client. */
042:            private String firstName;
043:            /** Surname of the client. */
044:            private String surname;
045:            /** Nickname of the client. */
046:            private String nickname;
047:            /** Age of the client. */
048:            private int age;
049:            /** Sex of the client (0 - female, 1 - male). */
050:            private int sex;
051:            /** Marital status of the client (0 - single, 1 - married, 2 - separated, 3 - divorced) */
052:            private int maritalStatus;
053:            /** E-mail of the client. */
054:            private String email;
055:            /** Home web page of the client. */
056:            private String web;
057:            /** Instant messenger of the client. */
058:            private String im;
059:
060:            // <editor-fold defaultstate="collapsed" desc="PropertyChange Stuff">
061:            private final PropertyChangeSupport changeSupport = new PropertyChangeSupport(
062:                    this );
063:
064:            public void addPropertyChangeListener(
065:                    PropertyChangeListener listener) {
066:                changeSupport.addPropertyChangeListener(listener);
067:            }
068:
069:            public void removePropertyChangeListener(
070:                    PropertyChangeListener listener) {
071:                changeSupport.removePropertyChangeListener(listener);
072:            }
073:
074:            // </editor-fold>
075:
076:            // <editor-fold defaultstate="collapsed" desc="Get Methods">
077:            public String getFirstName() {
078:                return firstName;
079:            }
080:
081:            public String getSurname() {
082:                return surname;
083:            }
084:
085:            public String getNickname() {
086:                return nickname;
087:            }
088:
089:            public int getAge() {
090:                return age;
091:            }
092:
093:            public String getEmail() {
094:                return email;
095:            }
096:
097:            public String getWeb() {
098:                return web;
099:            }
100:
101:            public String getIm() {
102:                return im;
103:            }
104:
105:            public int getSex() {
106:                return sex;
107:            }
108:
109:            public int getMaritalStatus() {
110:                return maritalStatus;
111:            }
112:
113:            // </editor-fold>
114:
115:            // <editor-fold defaultstate="collapsed" desc="Set Methods">
116:            public void setFirstName(String firstName) {
117:                String oldFirstName = this .firstName;
118:                this .firstName = firstName;
119:                changeSupport.firePropertyChange("firstName", oldFirstName,
120:                        firstName);
121:            }
122:
123:            public void setSurname(String surname) {
124:                String oldSurname = this .surname;
125:                this .surname = surname;
126:                changeSupport
127:                        .firePropertyChange("surname", oldSurname, surname);
128:            }
129:
130:            public void setNickname(String nickname) {
131:                String oldNickname = this .nickname;
132:                this .nickname = nickname;
133:                changeSupport.firePropertyChange("nickname", oldNickname,
134:                        nickname);
135:            }
136:
137:            public void setAge(int age) {
138:                int oldAge = this .age;
139:                this .age = age;
140:                changeSupport.firePropertyChange("age", oldAge, age);
141:            }
142:
143:            public void setEmail(String email) {
144:                String oldEmail = this .email;
145:                this .email = email;
146:                changeSupport.firePropertyChange("email", oldEmail, email);
147:            }
148:
149:            public void setWeb(String web) {
150:                String oldWeb = this .web;
151:                this .web = web;
152:                changeSupport.firePropertyChange("web", oldWeb, web);
153:            }
154:
155:            public void setIm(String im) {
156:                String oldIm = this .im;
157:                this .im = im;
158:                changeSupport.firePropertyChange("im", oldIm, im);
159:            }
160:
161:            public void setSex(int sex) {
162:                int oldSex = this .sex;
163:                this .sex = sex;
164:                changeSupport.firePropertyChange("sex", oldSex, sex);
165:            }
166:
167:            public void setMaritalStatus(int maritalStatus) {
168:                int oldMaritalStatus = this .maritalStatus;
169:                this .maritalStatus = maritalStatus;
170:                changeSupport.firePropertyChange("maritalStatus",
171:                        oldMaritalStatus, maritalStatus);
172:            }
173:
174:            // </editor-fold>
175:
176:            public static Client createTestClient() {
177:                Client client = new Client();
178:                client.setFirstName("George");
179:                client.setSurname("Foo");
180:                client.setNickname("Juraj");
181:                client.setAge(30);
182:
183:                client.setEmail("g.foo@foo.org");
184:                client.setWeb("https://beansbinding.dev.java.net");
185:                client.setIm("ICQ: 53 25 89 76");
186:
187:                client.setSex(1);
188:                client.setMaritalStatus(2);
189:
190:                return client;
191:            }
192:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.