Source Code Cross Referenced for TileCodecParameterList.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » tilecodec » 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 » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai.tilecodec 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $RCSfile: TileCodecParameterList.java,v $
003:         *
004:         * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * Use is subject to license terms.
007:         *
008:         * $Revision: 1.1 $
009:         * $Date: 2005/02/11 04:57:55 $
010:         * $State: Exp $
011:         */package javax.media.jai.tilecodec;
012:
013:        import javax.media.jai.ParameterListDescriptor;
014:        import javax.media.jai.ParameterListImpl;
015:
016:        /**
017:         * A subclass of <code>ParameterListImpl</code> that is specific to 
018:         * tile codecs. This class functions in either one or both of the two
019:         * registry modes supported by the <code>TileCodecDescriptor</code>
020:         * - "tileEncoder" and "tileDecoder".
021:         *
022:         * <p> This class is not intended to be subclassed for each individual
023:         * <code>TileEncoder</code> or <code>TileDecoder</code>. This is a generic
024:         * class which can be used as is for representing a parameter list for
025:         * any tile encoding/decoding format. The <code>ParameterListDescriptor</code>
026:         * provided as argument to the constructor should be the one returned from
027:         * the <code>getParameterListDescriptor()</code> method of the 
028:         * <code>TileCodecDescriptor</code> for the given format name. 
029:         *
030:         * <p> If the associated <code>TileCodecDescriptor</code>'s
031:         * <code>includesSampleModelInfo()</code> method returns false, then for the
032:         * "tileDecoder" mode, this class will be expected to contain a parameter
033:         * named "sampleModel" with a non-null <code>SampleModel</code> as its value.
034:         *
035:         * @since JAI 1.1
036:         */
037:        public class TileCodecParameterList extends ParameterListImpl {
038:
039:            // The name of the format
040:            private String formatName;
041:
042:            // The modes valid for this class
043:            private String validModes[];
044:
045:            /**
046:             * Creates a <code>TileCodecParameterList</code>. The
047:             * <code>validModes</code> argument specifies the registry modes valid
048:             * for this <code>TileCodecParameterList</code>. This should contain 
049:             * the "tileEncoder" registry mode or the "tileDecoder" registry
050:             * mode or both. The supplied descriptor object specifies the names
051:             * and number of the valid parameters, their <code>Class</code> types, 
052:             * as well as the <code>Range</code> of valid values for each parameter.
053:             *
054:             * @param formatName The name of the format, parameters for which are
055:             *                   specified through this parameter list.
056:             * @param validModes An array of <code>String</code> objects specifying
057:             *                   which registry modes are valid for this parameter list.
058:             * @param descriptor The <code>ParameterListDescriptor</code> object that
059:             *                   describes all valid parameters for this format. This
060:             *                   must be the the same descriptor that is returned from
061:             *                   the <code>getParameterListDescriptor()</code> method of
062:             *                   the <code>TileCodecDescriptor</code> for the given
063:             *                   formatName.
064:             *
065:             * @throws IllegalArgumentException if formatName is null.
066:             * @throws IllegalArgumentException if validModes is null.
067:             * @throws IllegalArgumentException if descriptor is null.
068:             */
069:            public TileCodecParameterList(String formatName,
070:                    String validModes[], ParameterListDescriptor descriptor) {
071:                super (descriptor);
072:
073:                // Cause IllegalArgumentException to be thrown if any of the 
074:                // arguments is null.
075:                if (formatName == null) {
076:                    throw new IllegalArgumentException(JaiI18N
077:                            .getString("TileCodecDescriptorImpl0"));
078:                }
079:
080:                if (validModes == null) {
081:                    throw new IllegalArgumentException(JaiI18N
082:                            .getString("TileCodecParameterList0"));
083:                }
084:
085:                if (descriptor == null) {
086:                    throw new IllegalArgumentException(JaiI18N
087:                            .getString("TileCodecParameterList1"));
088:                }
089:
090:                this .formatName = formatName;
091:                this .validModes = validModes;
092:            }
093:
094:            /**
095:             * Returns the name of the format which this parameter list describes.
096:             */
097:            public String getFormatName() {
098:                return formatName;
099:            }
100:
101:            /**
102:             * Returns true if the parameters in this 
103:             * <code>TileCodecParameterList</code> are valid for the specified 
104:             * registry mode name, false otherwise. The valid modes for
105:             * this class are the "tileEncoder" registry mode, and the
106:             * "tileDecoder" registry mode.
107:             */
108:            public boolean isValidForMode(String registryModeName) {
109:                for (int i = 0; i < validModes.length; i++) {
110:                    if (validModes[i].equalsIgnoreCase(registryModeName)) {
111:                        return true;
112:                    }
113:                }
114:
115:                return false;
116:            }
117:
118:            /**
119:             * Returns all the modes that this <code>TileCodecParameterList</code>
120:             * is valid for, as a <code>String</code> array.
121:             */
122:            public String[] getValidModes() {
123:                return (String[]) validModes.clone();
124:            }
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.