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


001:        package net.refractions.udig.project;
002:
003:        import java.awt.Color;
004:        import java.io.IOException;
005:        import java.net.URL;
006:
007:        import net.refractions.udig.catalog.IGeoResource;
008:
009:        import org.eclipse.core.runtime.IProgressMonitor;
010:        import org.eclipse.ui.IMemento;
011:
012:        /**
013:         * TODO Purpose of net.refractions.udig.project
014:         * <p>
015:         * </p>
016:         * 
017:         * @author Jesse
018:         * @since 1.0.0
019:         */
020:        public abstract class StyleContent {
021:
022:            /** <code>XPID</code> field */
023:            public static final String XPID = "net.refractions.udig.project.style"; //$NON-NLS-1$
024:
025:            private String id;
026:
027:            /**
028:             * Unique identifier of the style. This id must be the same as the id declared by the extension
029:             * point.
030:             * <p>
031:             * This id is also used by Renderer and StyleConfigurator, often implementation will have a
032:             * <code>static final String ID</code> defined for programmers.
033:             * </p>
034:             * 
035:             * @return The style id which identifies the style.
036:             * @uml.property name="id"
037:             */
038:            public String getId() {
039:                return id;
040:            }
041:
042:            /**
043:             * Construct with ID suplied by subclass.  This id must be the same as the id declared by the extension
044:             * point.
045:             * 
046:             * @param id
047:             */
048:            protected StyleContent(String id) {
049:                this .id = id;
050:            }
051:
052:            /**
053:             * Returns the class of the object which does the actual styling work.
054:             * 
055:             * @return the class of the style object.
056:             */
057:            public abstract Class getStyleClass();
058:
059:            /**
060:             * Saves the state of a style object.
061:             * <p>
062:             * (Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be
063:             * writen).
064:             * </p>
065:             * 
066:             * @param style the style object to persisit.
067:             * @param memento Momento used to store the style object state.
068:             */
069:            public abstract void save(IMemento memento, Object value);
070:
071:            /**
072:             * Loads a style object from a memento.
073:             * <p>
074:             * (Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be
075:             * writen).
076:             * </p>
077:             * 
078:             * @param memento object which contains previously saved object state.
079:             * @return Loaded object and state.
080:             */
081:            public abstract Object load(IMemento memento);
082:
083:            /**
084:             * Loads a style object from a URL. This method is blocking.
085:             * 
086:             * @param url the URL pointing to the style's location
087:             * @param monitor Progress monitor to report back to caller, allowed to be null.
088:             * @return a load style object, or null if it could not be loaded
089:             * @throws IOException if there is an error loading the URL
090:             */
091:            public abstract Object load(URL url, IProgressMonitor monitor)
092:                    throws IOException;
093:
094:            // /**
095:            // * Creates a default style object from a geo resource. If the style does not support the
096:            // * georesource, null should be returned. This method is allowed to block.
097:            // *
098:            // * @param resource The geo resource of the to be created layer.
099:            // * @param scheme The color scheme of the map.
100:            // * @param layerIndex The index to be used to determine which colors use in the style.
101:            // *
102:            // * @param monitor Progress monitor to report back to caller, allowed to be null.
103:            // * @return A default style object, or null style does not apply to the georesource.
104:            // * @throws IOException
105:            // */
106:            // public abstract Object createDefaultStyle(IGeoResource resource,
107:            // ColourScheme scheme, int index, IProgressMonitor monitor)
108:            // throws IOException;
109:
110:            /**
111:             * Creates a default Style give a resource and color.
112:             * 
113:             * @param resource to attempt to create a style for.
114:             * @param colour color to use while creating style.
115:             * @param monitor monitor used to show progress of style creation.
116:             * @return a "default" style or null if the style does not apply to the resource
117:             * @throws IOException if a problem occurs accessing the GeoResource.
118:             */
119:            public abstract Object createDefaultStyle(IGeoResource resource,
120:                    Color colour, IProgressMonitor monitor) throws IOException;
121:
122:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.