Source Code Cross Referenced for BasicMapperView.java in  » IDE-Netbeans » soa » org » netbeans » modules » soa » mapper » basicmapper » 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 » soa » org.netbeans.modules.soa.mapper.basicmapper 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms of the Common Development
003:         * and Distribution License (the License). You may not use this file except in
004:         * compliance with the License.
005:         * 
006:         * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007:         * or http://www.netbeans.org/cddl.txt.
008:         * 
009:         * When distributing Covered Code, include this CDDL Header Notice in each file
010:         * and include the License file at http://www.netbeans.org/cddl.txt.
011:         * If applicable, add the following below the CDDL Header, with the fields
012:         * enclosed by brackets [] replaced by your own identifying information:
013:         * "Portions Copyrighted [year] [name of copyright owner]"
014:         * 
015:         * The Original Software is NetBeans. The Initial Developer of the Original
016:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017:         * Microsystems, Inc. All Rights Reserved.
018:         */
019:
020:        package org.netbeans.modules.soa.mapper.basicmapper;
021:
022:        import java.awt.Component;
023:        import java.beans.PropertyChangeListener;
024:        import java.util.List;
025:        import java.util.Vector;
026:
027:        import org.netbeans.modules.soa.mapper.basicmapper.util.MapperUtilities;
028:        import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapperView;
029:        import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicViewManager;
030:        import org.netbeans.modules.soa.mapper.common.IMapperAutoLayout;
031:        import org.netbeans.modules.soa.mapper.common.IMapperListener;
032:        import org.netbeans.modules.soa.mapper.common.IMapperViewModel;
033:
034:        /**
035:         * <p>
036:         *
037:         * Title: </p> BasicMapperView<p>
038:         *
039:         * Description: </p> BasicMapperView provides basic setter and getter for
040:         * IBasicMapperView interface.<p>
041:         *
042:         * @author    Un Seng Leong
043:         * @created   December 23, 2002
044:         */
045:
046:        public class BasicMapperView implements  IBasicMapperView {
047:
048:            /**
049:             * the view manager handles this view
050:             */
051:            private IBasicViewManager mViewManager;
052:
053:            /**
054:             * the view model to be display in this view.
055:             */
056:            private IMapperViewModel mViewModel;
057:
058:            /**
059:             * the java component repersenting this view
060:             */
061:            private Component mComp;
062:
063:            /**
064:             * the object handles autolayout
065:             */
066:            private IMapperAutoLayout mAutoLayout;
067:
068:            /**
069:             * the name of this mapper view
070:             */
071:            private String mViewName;
072:
073:            /**
074:             * the property listeners list
075:             */
076:            private List mPropertyListeners;
077:
078:            /**
079:             * flag indicates if this mapper tree is mapping enable.
080:             */
081:            private boolean mIsMapable = true;
082:
083:            /**
084:             * Constructor for the BasicMapperView object
085:             */
086:            public BasicMapperView() {
087:                mPropertyListeners = new Vector();
088:            }
089:
090:            /**
091:             * Sets the viewManager attribute of the BasicMapperView object
092:             *
093:             * @param viewManager  The new viewManager value
094:             */
095:            public void setViewManager(IBasicViewManager viewManager) {
096:                mViewManager = viewManager;
097:            }
098:
099:            /**
100:             * Return the view manager handles this view.
101:             *
102:             * @return   the view manager handles this view.
103:             */
104:            public IBasicViewManager getViewManager() {
105:                return mViewManager;
106:            }
107:
108:            /**
109:             * Return a java visual object repersents this view.
110:             *
111:             * @return   a java visual object repersents this view.
112:             */
113:            public Component getViewComponent() {
114:                return mComp;
115:            }
116:
117:            /**
118:             * Sets the viewComponent attribute of the BasicMapperView object
119:             *
120:             * @param comp  The new viewComponent value
121:             */
122:            public void setViewComponent(Component comp) {
123:                mComp = comp;
124:            }
125:
126:            /**
127:             * Set the view model of this view should display.
128:             *
129:             * @param model  the link mode to display
130:             */
131:            public void setViewModel(IMapperViewModel model) {
132:                IMapperViewModel oldModel = mViewModel;
133:                mViewModel = model;
134:                firePropertyChange(IBasicMapperView.MODEL_CHANGE, model,
135:                        oldModel);
136:            }
137:
138:            /**
139:             * Return the current mapper view model of this view.
140:             *
141:             * @return   the mapper view model of this view.
142:             */
143:            public IMapperViewModel getViewModel() {
144:                return mViewModel;
145:            }
146:
147:            /**
148:             * Return a name of this view.
149:             *
150:             * @return   a String repersentation of this view name.
151:             */
152:            public String getViewName() {
153:                return mViewName;
154:            }
155:
156:            /**
157:             * Set a name of this view.
158:             *
159:             * @param name  a String repersentation of this view name.
160:             */
161:            public void setViewName(String name) {
162:                String oldName = mViewName;
163:                mViewName = name;
164:                firePropertyChange(IBasicMapperView.NAME_CHANGE, name, oldName);
165:            }
166:
167:            /**
168:             * Return true if this view is mapping enable, false otherwise.
169:             *
170:             * @return   The droppable value
171:             */
172:            public boolean isMapable() {
173:                return mIsMapable;
174:            }
175:
176:            /**
177:             * Set if this view is mapping enable.
178:             *
179:             * @param droppable  the flag indicates if this view is mapping enable.
180:             */
181:            public void setIsMapable(boolean mapable) {
182:                mIsMapable = mapable;
183:            }
184:
185:            /**
186:             * Set the auto layout object of this view.
187:             *
188:             * @param autoLayout  the auto layout of this view.
189:             */
190:            public void setAutoLayout(IMapperAutoLayout autoLayout) {
191:                mAutoLayout = autoLayout;
192:            }
193:
194:            /**
195:             * Return the auto layout object of this view.
196:             *
197:             * @return   the auto layout object of this view.
198:             */
199:            public IMapperAutoLayout getAutoLayout() {
200:                return mAutoLayout;
201:            }
202:
203:            /**
204:             * Adds a PropertyChangeListener to the listener list.
205:             *
206:             * @param listener  the PropertyChangeListener to be added
207:             */
208:            public void addPropertyChangeListener(
209:                    PropertyChangeListener listener) {
210:                mPropertyListeners.add(listener);
211:            }
212:
213:            /**
214:             * Removes a PropertyChangeListener from the listener list.
215:             *
216:             * @param listener  the PropertyChangeListener to be added
217:             */
218:            public void removePropertyChangeListener(
219:                    PropertyChangeListener listener) {
220:                mPropertyListeners.remove(listener);
221:            }
222:
223:            /**
224:             * Throws UnsupportedOperationException, use IBasicMapper.addMapperListener
225:             * instead.
226:             *
227:             * @param listener  the IMapperListener to be added
228:             */
229:            public void addMapperListener(IMapperListener listener) {
230:                throw new UnsupportedOperationException(
231:                        "Use IBasicMapper.addMapperListener instead");
232:            }
233:
234:            /**
235:             * Throws UnsupportedOperationException, use
236:             * IBasicMapper.removeMapperListener instead.
237:             *
238:             * @param listener  the IMapperListener to be added
239:             */
240:            public void removeMapperListener(IMapperListener listener) {
241:                throw new UnsupportedOperationException(
242:                        "Use IBasicMapper.removeMapperListener instead");
243:            }
244:
245:            /**
246:             * Fire a specified property change event of this node.
247:             *
248:             * @param propertyName  the name of this property has changed
249:             * @param newValue      the new value of the property
250:             * @param oldValue      the old value of the property
251:             */
252:            protected void firePropertyChange(String propertyName,
253:                    Object newValue, Object oldValue) {
254:
255:                if (mPropertyListeners.size() > 0) {
256:                    MapperUtilities
257:                            .firePropertyChanged(
258:                                    (PropertyChangeListener[]) mPropertyListeners
259:                                            .toArray(new PropertyChangeListener[mPropertyListeners
260:                                                    .size()]), this,
261:                                    propertyName, newValue, oldValue);
262:                }
263:            }
264:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.