Source Code Cross Referenced for BoxItemProvider.java in  » GIS » udig-1.1 » net » refractions » udig » printing » model » provider » 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 » GIS » udig 1.1 » net.refractions.udig.printing.model.provider 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * <copyright>
003:         * </copyright>
004:         *
005:         * $Id: BoxItemProvider.java 23333 2006-12-08 19:40:41Z jeichar $
006:         */package net.refractions.udig.printing.model.provider;
007:
008:        import java.util.Collection;
009:        import java.util.List;
010:
011:        import net.refractions.udig.printing.model.Box;
012:        import net.refractions.udig.printing.model.ModelPackage;
013:
014:        import org.eclipse.emf.common.notify.AdapterFactory;
015:        import org.eclipse.emf.common.notify.Notification;
016:        import org.eclipse.emf.common.util.ResourceLocator;
017:        import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
018:        import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
019:        import org.eclipse.emf.edit.provider.IItemLabelProvider;
020:        import org.eclipse.emf.edit.provider.IItemPropertySource;
021:        import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
022:        import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
023:        import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
024:        import org.eclipse.emf.edit.provider.ViewerNotification;
025:
026:        /**
027:         * This is the item provider adapter for a {@link net.refractions.udig.printing.model.Box} object.
028:         * <!-- begin-user-doc -->
029:         * <!-- end-user-doc -->
030:         * @generated
031:         */
032:        public class BoxItemProvider extends ElementItemProvider implements 
033:                IEditingDomainItemProvider, IStructuredItemContentProvider,
034:                ITreeItemContentProvider, IItemLabelProvider,
035:                IItemPropertySource {
036:            /**
037:             * This constructs an instance from a factory and a notifier.
038:             * <!-- begin-user-doc -->
039:             * <!-- end-user-doc -->
040:             * @generated
041:             */
042:            public BoxItemProvider(AdapterFactory adapterFactory) {
043:                super (adapterFactory);
044:            }
045:
046:            /**
047:             * This returns the property descriptors for the adapted class.
048:             * <!-- begin-user-doc -->
049:             * <!-- end-user-doc -->
050:             * @generated
051:             */
052:            public List getPropertyDescriptors(Object object) {
053:                if (itemPropertyDescriptors == null) {
054:                    super .getPropertyDescriptors(object);
055:
056:                    addSourceConnectionsPropertyDescriptor(object);
057:                    addTargetConnectionsPropertyDescriptor(object);
058:                    addBoxPrinterPropertyDescriptor(object);
059:                    addIDPropertyDescriptor(object);
060:                }
061:                return itemPropertyDescriptors;
062:            }
063:
064:            /**
065:             * This adds a property descriptor for the Source Connections feature.
066:             * <!-- begin-user-doc -->
067:             * <!-- end-user-doc -->
068:             * @generated
069:             */
070:            protected void addSourceConnectionsPropertyDescriptor(Object object) {
071:                itemPropertyDescriptors
072:                        .add(createItemPropertyDescriptor(
073:                                ((ComposeableAdapterFactory) adapterFactory)
074:                                        .getRootAdapterFactory(),
075:                                getResourceLocator(),
076:                                getString("_UI_Box_sourceConnections_feature"), //$NON-NLS-1$
077:                                getString(
078:                                        "_UI_PropertyDescriptor_description", "_UI_Box_sourceConnections_feature", "_UI_Box_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
079:                                ModelPackage.eINSTANCE
080:                                        .getBox_SourceConnections(), true,
081:                                null, null, null));
082:            }
083:
084:            /**
085:             * This adds a property descriptor for the Target Connections feature.
086:             * <!-- begin-user-doc -->
087:             * <!-- end-user-doc -->
088:             * @generated
089:             */
090:            protected void addTargetConnectionsPropertyDescriptor(Object object) {
091:                itemPropertyDescriptors
092:                        .add(createItemPropertyDescriptor(
093:                                ((ComposeableAdapterFactory) adapterFactory)
094:                                        .getRootAdapterFactory(),
095:                                getResourceLocator(),
096:                                getString("_UI_Box_targetConnections_feature"), //$NON-NLS-1$
097:                                getString(
098:                                        "_UI_PropertyDescriptor_description", "_UI_Box_targetConnections_feature", "_UI_Box_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
099:                                ModelPackage.eINSTANCE
100:                                        .getBox_TargetConnections(), true,
101:                                null, null, null));
102:            }
103:
104:            /**
105:             * This adds a property descriptor for the Box Printer feature.
106:             * <!-- begin-user-doc -->
107:             * <!-- end-user-doc -->
108:             * @generated
109:             */
110:            protected void addBoxPrinterPropertyDescriptor(Object object) {
111:                itemPropertyDescriptors
112:                        .add(createItemPropertyDescriptor(
113:                                ((ComposeableAdapterFactory) adapterFactory)
114:                                        .getRootAdapterFactory(),
115:                                getResourceLocator(),
116:                                getString("_UI_Box_boxPrinter_feature"), //$NON-NLS-1$
117:                                getString(
118:                                        "_UI_PropertyDescriptor_description", "_UI_Box_boxPrinter_feature", "_UI_Box_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
119:                                ModelPackage.eINSTANCE.getBox_BoxPrinter(),
120:                                true,
121:                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
122:                                null, null));
123:            }
124:
125:            /**
126:             * This adds a property descriptor for the ID feature.
127:             * <!-- begin-user-doc -->
128:             * <!-- end-user-doc -->
129:             * @generated
130:             */
131:            protected void addIDPropertyDescriptor(Object object) {
132:                itemPropertyDescriptors
133:                        .add(createItemPropertyDescriptor(
134:                                ((ComposeableAdapterFactory) adapterFactory)
135:                                        .getRootAdapterFactory(),
136:                                getResourceLocator(),
137:                                getString("_UI_Box_iD_feature"), //$NON-NLS-1$
138:                                getString(
139:                                        "_UI_PropertyDescriptor_description", "_UI_Box_iD_feature", "_UI_Box_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
140:                                ModelPackage.eINSTANCE.getBox_ID(), true,
141:                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
142:                                null, null));
143:            }
144:
145:            /**
146:             * This returns Box.gif.
147:             * <!-- begin-user-doc -->
148:             * <!-- end-user-doc -->
149:             * @generated
150:             */
151:            public Object getImage(Object object) {
152:                return getResourceLocator().getImage("full/obj16/Box"); //$NON-NLS-1$
153:            }
154:
155:            /**
156:             * This returns the label text for the adapted class.
157:             * <!-- begin-user-doc -->
158:             * <!-- end-user-doc -->
159:             * @generated
160:             */
161:            public String getText(Object object) {
162:                String label = ((Box) object).getID();
163:                return label == null || label.length() == 0 ? getString("_UI_Box_type") : //$NON-NLS-1$
164:                        getString("_UI_Box_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
165:            }
166:
167:            /**
168:             * This handles model notifications by calling {@link #updateChildren} to update any cached
169:             * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
170:             * <!-- begin-user-doc -->
171:             * <!-- end-user-doc -->
172:             * @generated
173:             */
174:            public void notifyChanged(Notification notification) {
175:                updateChildren(notification);
176:
177:                switch (notification.getFeatureID(Box.class)) {
178:                case ModelPackage.BOX__BOX_PRINTER:
179:                case ModelPackage.BOX__ID:
180:                    fireNotifyChanged(new ViewerNotification(notification,
181:                            notification.getNotifier(), false, true));
182:                    return;
183:                }
184:                super .notifyChanged(notification);
185:            }
186:
187:            /**
188:             * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
189:             * describing all of the children that can be created under this object.
190:             * <!-- begin-user-doc -->
191:             * <!-- end-user-doc -->
192:             * @generated
193:             */
194:            protected void collectNewChildDescriptors(
195:                    Collection newChildDescriptors, Object object) {
196:                super .collectNewChildDescriptors(newChildDescriptors, object);
197:            }
198:
199:            /**
200:             * Return the resource locator for this item provider's resources.
201:             * <!-- begin-user-doc -->
202:             * <!-- end-user-doc -->
203:             * @generated
204:             */
205:            public ResourceLocator getResourceLocator() {
206:                return PageEditPlugin.INSTANCE;
207:            }
208:
209:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.