Source Code Cross Referenced for XTIFFEncodeParam.java in  » GIS » openjump » org » libtiff » jai » codec » 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 » openjump » org.libtiff.jai.codec 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.libtiff.jai.codec;
002:
003:        /*
004:         * XTIFF: eXtensible TIFF libraries for JAI.
005:         * 
006:         * The contents of this file are subject to the  JAVA ADVANCED IMAGING
007:         * SAMPLE INPUT-OUTPUT CODECS AND WIDGET HANDLING SOURCE CODE  License
008:         * Version 1.0 (the "License"); You may not use this file except in
009:         * compliance with the License. You may obtain a copy of the License at
010:         * http://www.sun.com/software/imaging/JAI/index.html
011:         *
012:         * Software distributed under the License is distributed on an "AS IS"
013:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
014:         * the License for the specific language governing rights and limitations
015:         * under the License. 
016:         *
017:         * The Original Code is JAVA ADVANCED IMAGING SAMPLE INPUT-OUTPUT CODECS
018:         * AND WIDGET HANDLING SOURCE CODE. 
019:         * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
020:         * Portions created by: Niles Ritter 
021:         * are Copyright (C): Niles Ritter, GeoTIFF.org, 1999,2000.
022:         * All Rights Reserved.
023:         * Contributor(s): Niles Ritter
024:         */
025:
026:        /**
027:         * An extension of <code>TIFFEncodeParam</code> for encoding images in 
028:         * the TIFF format using the XTIFF machinery. The encode object creates
029:         * an empty XTIFFDirectory, which the user may may access and add 
030:         * whatever XTIFFFields they need for annotation, compression, etc.
031:         * It shouldn't be necessary to extend this class further, as all
032:         * parameters will be passed through the XTIFFDirectory.
033:         */
034:
035:        import com.sun.media.jai.codec.TIFFEncodeParam;
036:
037:        public class XTIFFEncodeParam extends TIFFEncodeParam {
038:
039:            /* inherited: compression, tiled */
040:            private int _compression;
041:            private boolean _isTiled;
042:
043:            /** For XTIFF everything is stored in the directory */
044:            private XTIFFDirectory directory;
045:
046:            /** 
047:             * Promotes an XTIFFEncodeParam object from simpler one
048:             */
049:            public XTIFFEncodeParam(TIFFEncodeParam param) {
050:                initialize();
051:                if (param == null)
052:                    return;
053:                setCompression(param.getCompression());
054:                setWriteTiled(param.getWriteTiled());
055:            }
056:
057:            /** 
058:             * Constructs an XTIFFEncodeParam object with default values for parameters.
059:             */
060:            public XTIFFEncodeParam() {
061:                initialize();
062:            }
063:
064:            /** 
065:             * Initializes an XTIFFEncodeParam with default values for parameters.
066:             */
067:            public void initialize() {
068:                directory = XTIFFDirectory.create();
069:                setCompression(COMPRESSION_NONE);
070:                setWriteTiled(false);
071:            }
072:
073:            public XTIFFDirectory getDirectory() {
074:                return directory;
075:            }
076:
077:            /**
078:             * Specifies the type of compression to be used. The compression type
079:             * specified will be honored only if it is compatible with the image
080:             * being written out. 
081:             *
082:             * @param compression    The compression type.
083:             */
084:            public void setCompression(int compression) {
085:                directory.setCompression(compression);
086:                _compression = compression;
087:            }
088:
089:            /**
090:             * Specifies the type of compression to be used. The compression type
091:             * specified will be honored only if it is compatible with the image
092:             * being written out. 
093:             *
094:             */
095:            public int getCompression() {
096:                return _compression;
097:            }
098:
099:            /**
100:             * If set, the data is in tiled format, instead of
101:             * in strips.
102:             */
103:            public boolean getWriteTiled() {
104:                return _isTiled;
105:            }
106:
107:            /**
108:             * If set, the data will be written out in tiled format, instead of
109:             * in strips.
110:             *
111:             * @param writeTiled     Specifies whether the image data should be 
112:             *                       wriiten out in tiled format.
113:             */
114:            public void setWriteTiled(boolean writeTiled) {
115:                directory.setIsTiled(writeTiled);
116:                _isTiled = writeTiled;
117:            }
118:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.