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


001:        package net.refractions.udig.style.sld;
002:
003:        import net.refractions.udig.project.internal.Layer;
004:
005:        import org.eclipse.jface.resource.ImageDescriptor;
006:        import org.eclipse.swt.SWT;
007:        import org.eclipse.swt.layout.FillLayout;
008:        import org.eclipse.swt.widgets.Composite;
009:        import org.eclipse.swt.widgets.Control;
010:        import org.eclipse.ui.part.PageBook;
011:        import org.geotools.styling.StyleBuilder;
012:
013:        /**
014:         * Provides a user interface to edit a component of an Style Layer Descriptor (SLD) style object.
015:         * <p>
016:         * An SLD style component can be one of the following classes of object:
017:         * <ul>
018:         * <li>
019:         * 
020:         * @see org.geotools.renderer.style.Style
021:         *      <li>
022:         * @see org.geotools.styling.FeatureTypeStyle
023:         *      <li>
024:         * @see org.geotools.styling.Rule
025:         *      <li>
026:         * @see org.geotools.styling.Symbolizer
027:         *      </ul>
028:         *      </p>
029:         *      <p>
030:         *      This object does not store state. Any state information of ui widgets must be immediatley
031:         *      reflected in the style component.
032:         *      </p>
033:         * @author Justin Deoliveira, Refractions Research Inc.
034:         */
035:        public abstract class SLDEditorPart {
036:
037:            public static final String XPID = "net.refractions.udig.style.sld.sldEditorPart"; //$NON-NLS-1$
038:
039:            /** the ui control for the SLDEditor part * */
040:            private Composite page;
041:
042:            /** the style component * */
043:            private Object content;
044:
045:            /** the label for the SLDEditor part * */
046:            private String label;
047:
048:            /** the path to the icon for the extension * */
049:            private ImageDescriptor image;
050:
051:            /** the layer being styled * */
052:            private Layer layer;
053:
054:            /** the id of the plugin providing the extension * */
055:            private String pluginId;
056:
057:            /** style builder used to create styling * */
058:            private StyleBuilder styleBuilder;
059:
060:            public SLDEditorPart() {
061:
062:            }
063:
064:            /**
065:             * Returns the ui control. This method should not be overridden.
066:             * 
067:             * @return The ui control.
068:             */
069:            public Composite getPage() {
070:                return page;
071:            }
072:
073:            /**
074:             * Signals the ui control to be created. This method should not be overidden.
075:             * 
076:             * @param parent The parent control.
077:             */
078:            public void createControl(PageBook book) {
079:                page = new Composite(book, SWT.NONE);
080:                page.setLayout(new FillLayout());
081:                page.setData(getLabel());
082:                createPartControl(page);
083:            }
084:
085:            /**
086:             * @return Returns the content.
087:             */
088:            public Object getContent() {
089:                return content;
090:            }
091:
092:            /**
093:             * @param content The content to set.
094:             */
095:            public void setContent(Object content) {
096:                this .content = content;
097:            }
098:
099:            /**
100:             * @return Returns the label.
101:             */
102:            public String getLabel() {
103:                return label;
104:            }
105:
106:            /**
107:             * @param label The label to set.
108:             */
109:            public void setLabel(String label) {
110:                this .label = label;
111:            }
112:
113:            /**
114:             * @return Returns the layer.
115:             */
116:            public Layer getLayer() {
117:                return layer;
118:            }
119:
120:            /**
121:             * @param layer The layer to set.
122:             */
123:            public void setLayer(Layer layer) {
124:                this .layer = layer;
125:            }
126:
127:            /**
128:             * @param styleBuilder The styleBuilder to set.
129:             */
130:            public void setStyleBuilder(StyleBuilder styleBuilder) {
131:                this .styleBuilder = styleBuilder;
132:            }
133:
134:            /**
135:             * @return Returns the styleBuilder.
136:             */
137:            public StyleBuilder getStyleBuilder() {
138:                return styleBuilder;
139:            }
140:
141:            /**
142:             * @param image The image descriptor.
143:             */
144:            public void setImageDescriptor(ImageDescriptor image) {
145:                this .image = image;
146:            }
147:
148:            /**
149:             * @return The image descriptor.
150:             */
151:            public ImageDescriptor getImageDescriptor() {
152:                return image;
153:            }
154:
155:            /**
156:             * @param pluginId The pluginId to set.
157:             */
158:            public void setPluginId(String pluginId) {
159:                this .pluginId = pluginId;
160:            }
161:
162:            /**
163:             * @return Returns the pluginId.
164:             */
165:            public String getPluginId() {
166:                return pluginId;
167:            }
168:
169:            /**
170:             * Returns an image descriptor for the editor part. Sublcasses have the option of overiding to
171:             * provide a custom image.
172:             */
173:            public ImageDescriptor createImageDescriptor() {
174:                return SLD.createImageDescriptor(getContentType());
175:            }
176:
177:            /**
178:             * Initializes the editor. This method is called before the ui is created so this method should
179:             * not attempt to access any of its (yet to be created) widgets.
180:             */
181:            public abstract void init();
182:
183:            /**
184:             * Style class, like TextSymbolizer, used for editing.
185:             * 
186:             * @return the class of style component the ui is used for editing.
187:             */
188:            public abstract Class getContentType();
189:
190:            /**
191:             * The internal method for creating the ui component. The parent control passed to the method
192:             * must not be modified in any way.
193:             * 
194:             * @param parent The parent control.
195:             * @return The newly created control.
196:             */
197:            protected abstract Control createPartControl(Composite parent);
198:
199:            /**
200:             * Resets the editor. This method resets the ui to reflect the new state of the content being
201:             * edited, and the layer being styled.. This method is not called unless content, and a layer
202:             * are available.
203:             */
204:            public abstract void reset();
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.