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


001:        package net.refractions.udig.core;
002:
003:        import org.geotools.filter.FilterFactory;
004:        import org.geotools.filter.FilterFactoryFinder;
005:        import org.geotools.styling.AnchorPoint;
006:        import org.geotools.styling.ColorMap;
007:        import org.geotools.styling.ColorMapEntry;
008:        import org.geotools.styling.Displacement;
009:        import org.geotools.styling.ExternalGraphic;
010:        import org.geotools.styling.FeatureTypeConstraint;
011:        import org.geotools.styling.FeatureTypeStyle;
012:        import org.geotools.styling.Fill;
013:        import org.geotools.styling.Graphic;
014:        import org.geotools.styling.Halo;
015:        import org.geotools.styling.LinePlacement;
016:        import org.geotools.styling.LineSymbolizer;
017:        import org.geotools.styling.Mark;
018:        import org.geotools.styling.NamedLayer;
019:        import org.geotools.styling.PointPlacement;
020:        import org.geotools.styling.PointSymbolizer;
021:        import org.geotools.styling.PolygonSymbolizer;
022:        import org.geotools.styling.RasterSymbolizer;
023:        import org.geotools.styling.Rule;
024:        import org.geotools.styling.Stroke;
025:        import org.geotools.styling.Style;
026:        import org.geotools.styling.StyleVisitor;
027:        import org.geotools.styling.StyledLayerDescriptor;
028:        import org.geotools.styling.Symbolizer;
029:        import org.geotools.styling.TextSymbolizer;
030:        import org.geotools.styling.UserLayer;
031:
032:        /**
033:         * Removes the transparency from a style.
034:         * 
035:         * @author Jesse
036:         */
037:        public class TransparencyRemovingVisitor implements  StyleVisitor {
038:
039:            public void visit(StyledLayerDescriptor arg0) {
040:                // nothing
041:            }
042:
043:            public void visit(NamedLayer arg0) {
044:                // nothing
045:            }
046:
047:            public void visit(UserLayer arg0) {
048:                // nothing
049:            }
050:
051:            public void visit(FeatureTypeConstraint arg0) {
052:                // nothing
053:            }
054:
055:            public void visit(Style arg0) {
056:                for (FeatureTypeStyle fts : arg0.getFeatureTypeStyles()) {
057:                    fts.accept(this );
058:                }
059:            }
060:
061:            public void visit(Rule arg0) {
062:                for (Symbolizer s : arg0.getSymbolizers()) {
063:                    s.accept(this );
064:                }
065:            }
066:
067:            public void visit(FeatureTypeStyle arg0) {
068:                for (Rule s : arg0.getRules()) {
069:                    s.accept(this );
070:                }
071:            }
072:
073:            FilterFactory fac = FilterFactoryFinder.createFilterFactory();
074:
075:            public void visit(Fill arg0) {
076:                arg0.setOpacity(fac.createLiteralExpression(1.0));
077:            }
078:
079:            public void visit(Stroke arg0) {
080:                arg0.setOpacity(fac.createLiteralExpression(1.0));
081:            }
082:
083:            public void visit(Symbolizer arg0) {
084:                if (arg0 instanceof  PointSymbolizer) {
085:                    PointSymbolizer ps = (PointSymbolizer) arg0;
086:                    ps.accept(this );
087:                }
088:                if (arg0 instanceof  PolygonSymbolizer) {
089:                    PolygonSymbolizer ps = (PolygonSymbolizer) arg0;
090:                    ps.accept(this );
091:                }
092:                if (arg0 instanceof  LineSymbolizer) {
093:                    LineSymbolizer ps = (LineSymbolizer) arg0;
094:                    ps.accept(this );
095:                }
096:                if (arg0 instanceof  TextSymbolizer) {
097:                    TextSymbolizer ps = (TextSymbolizer) arg0;
098:                    ps.accept(this );
099:                }
100:                if (arg0 instanceof  RasterSymbolizer) {
101:                    RasterSymbolizer ps = (RasterSymbolizer) arg0;
102:                    ps.accept(this );
103:                }
104:            }
105:
106:            public void visit(PointSymbolizer arg0) {
107:                arg0.getGraphic().accept(this );
108:            }
109:
110:            public void visit(LineSymbolizer arg0) {
111:                Stroke stroke = arg0.getStroke();
112:                if (stroke != null)
113:                    stroke.accept(this );
114:            }
115:
116:            public void visit(PolygonSymbolizer arg0) {
117:                Fill fill = arg0.getFill();
118:                if (fill != null)
119:                    fill.accept(this );
120:                Stroke stroke = arg0.getStroke();
121:                if (stroke != null)
122:                    stroke.accept(this );
123:            }
124:
125:            public void visit(TextSymbolizer arg0) {
126:                Fill fill = arg0.getFill();
127:                if (fill != null)
128:                    fill.accept(this );
129:            }
130:
131:            public void visit(RasterSymbolizer arg0) {
132:                arg0.setOpacity(fac.createLiteralExpression(1.0));
133:            }
134:
135:            public void visit(Graphic arg0) {
136:                arg0.setOpacity(fac.createLiteralExpression(1.0));
137:            }
138:
139:            public void visit(Mark arg0) {
140:                Fill fill = arg0.getFill();
141:                if (fill != null)
142:                    fill.accept(this );
143:
144:                Stroke stroke = arg0.getStroke();
145:                if (stroke != null)
146:                    stroke.accept(this );
147:            }
148:
149:            public void visit(ExternalGraphic arg0) {
150:                // nothing
151:            }
152:
153:            public void visit(PointPlacement arg0) {
154:                // nothing
155:
156:            }
157:
158:            public void visit(AnchorPoint arg0) {
159:                // nothing
160:            }
161:
162:            public void visit(Displacement arg0) {
163:                // nothing
164:            }
165:
166:            public void visit(LinePlacement arg0) {
167:                // nothing
168:            }
169:
170:            public void visit(Halo arg0) {
171:                Fill fill = arg0.getFill();
172:                if (fill != null)
173:                    fill.accept(this );
174:            }
175:
176:            public void visit(ColorMap colorMap) {
177:                // nothing
178:            }
179:
180:            public void visit(ColorMapEntry colorMapEntry) {
181:                // nothing
182:            }
183:
184:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.