001: /**
002: *
003: */package org.geotools.coverage.grid.io.imageio;
004:
005: import java.awt.Dimension;
006: import java.awt.Point;
007: import java.awt.Rectangle;
008: import java.util.Locale;
009:
010: import javax.imageio.IIOParamController;
011: import javax.imageio.ImageTypeSpecifier;
012: import javax.imageio.ImageWriteParam;
013:
014: /**
015: * @author Simone Giannecchini
016: * @since 2.3.x
017: *
018: */
019: public abstract class GeoToolsWriteParams extends ImageWriteParam {
020:
021: protected ImageWriteParam adaptee;
022:
023: public boolean canWriteCompressed() {
024: return adaptee.canWriteCompressed();
025: }
026:
027: public boolean canWriteProgressive() {
028:
029: return adaptee.canWriteProgressive();
030: }
031:
032: public boolean canWriteTiles() {
033:
034: return adaptee.canWriteTiles();
035: }
036:
037: public float getBitRate(float quality) {
038:
039: return adaptee.getBitRate(quality);
040: }
041:
042: public int getCompressionMode() {
043:
044: return adaptee.getCompressionMode();
045: }
046:
047: public float getCompressionQuality() {
048:
049: return adaptee.getCompressionQuality();
050: }
051:
052: public String[] getCompressionQualityDescriptions() {
053:
054: return adaptee.getCompressionQualityDescriptions();
055: }
056:
057: public float[] getCompressionQualityValues() {
058:
059: return adaptee.getCompressionQualityValues();
060: }
061:
062: public String getCompressionType() {
063:
064: return adaptee.getCompressionType();
065: }
066:
067: public String[] getCompressionTypes() {
068:
069: return adaptee.getCompressionTypes();
070: }
071:
072: public String getLocalizedCompressionTypeName() {
073:
074: return adaptee.getLocalizedCompressionTypeName();
075: }
076:
077: public Dimension[] getPreferredTileSizes() {
078:
079: return adaptee.getPreferredTileSizes();
080: }
081:
082: public int getProgressiveMode() {
083:
084: return adaptee.getProgressiveMode();
085: }
086:
087: public int getTileHeight() {
088:
089: return adaptee.getTileHeight();
090: }
091:
092: public int getTileWidth() {
093:
094: return adaptee.getTileWidth();
095: }
096:
097: public int getTilingMode() {
098:
099: return adaptee.getTilingMode();
100: }
101:
102: public boolean isCompressionLossless() {
103:
104: return adaptee.isCompressionLossless();
105: }
106:
107: public void setCompressionMode(int mode) {
108:
109: adaptee.setCompressionMode(mode);
110: }
111:
112: public void setCompressionQuality(float quality) {
113:
114: adaptee.setCompressionQuality(quality);
115: }
116:
117: public void setCompressionType(String compressionType) {
118:
119: adaptee.setCompressionType(compressionType);
120: }
121:
122: public void setProgressiveMode(int mode) {
123:
124: adaptee.setProgressiveMode(mode);
125: }
126:
127: public void setTiling(int tileWidth, int tileHeight) {
128:
129: adaptee.setTiling(tileWidth, tileHeight, 0, 0);
130: }
131:
132: public void setTilingMode(int mode) {
133:
134: adaptee.setTilingMode(mode);
135: }
136:
137: public void unsetCompression() {
138:
139: adaptee.unsetCompression();
140: }
141:
142: public void unsetTiling() {
143:
144: adaptee.unsetTiling();
145: }
146:
147: public void setDestinationType(ImageTypeSpecifier destinationType) {
148:
149: adaptee.setDestinationType(destinationType);
150: }
151:
152: public boolean canOffsetTiles() {
153: return false;
154: }
155:
156: public Locale getLocale() {
157: return adaptee.getLocale();
158: }
159:
160: public int getTileGridXOffset() {
161: return adaptee.getTileGridXOffset();
162: }
163:
164: public int getTileGridYOffset() {
165: return adaptee.getTileGridYOffset();
166: }
167:
168: public boolean activateController() {
169: throw new UnsupportedOperationException(
170: "This operation is not currently supported by this API");
171: }
172:
173: public IIOParamController getController() {
174: throw new UnsupportedOperationException(
175: "This operation is not currently supported by this API");
176: }
177:
178: public IIOParamController getDefaultController() {
179: throw new UnsupportedOperationException(
180: "This operation is not currently supported by this API");
181: }
182:
183: public Point getDestinationOffset() {
184: return adaptee.getDestinationOffset();
185: }
186:
187: public ImageTypeSpecifier getDestinationType() {
188: return adaptee.getDestinationType();
189: }
190:
191: public int[] getSourceBands() {
192: return adaptee.getSourceBands();
193: }
194:
195: public Rectangle getSourceRegion() {
196: return adaptee.getSourceRegion();
197: }
198:
199: public int getSourceXSubsampling() {
200: return adaptee.getSourceXSubsampling();
201: }
202:
203: public int getSourceYSubsampling() {
204: return adaptee.getSourceYSubsampling();
205: }
206:
207: public int getSubsamplingXOffset() {
208: return adaptee.getSubsamplingXOffset();
209: }
210:
211: public int getSubsamplingYOffset() {
212: return adaptee.getSubsamplingYOffset();
213: }
214:
215: public boolean hasController() {
216: return false;
217: }
218:
219: public void setController(IIOParamController controller) {
220: throw new UnsupportedOperationException(
221: "This operation is not currently supported by this API");
222: }
223:
224: public void setDestinationOffset(Point destinationOffset) {
225: throw new UnsupportedOperationException(
226: "This operation is not currently supported by this API");
227: }
228:
229: public void setSourceBands(int[] sourceBands) {
230: adaptee.setSourceBands(sourceBands);
231: }
232:
233: public void setSourceRegion(Rectangle sourceRegion) {
234: throw new UnsupportedOperationException(
235: "This operation is not currently supported by this API");
236: }
237:
238: public void setSourceSubsampling(int sourceXSubsampling,
239: int sourceYSubsampling, int subsamplingXOffset,
240: int subsamplingYOffset) {
241: throw new UnsupportedOperationException(
242: "This operation is not currently supported by this API");
243: }
244:
245: /**
246: *
247: */
248: public GeoToolsWriteParams(final ImageWriteParam adaptee) {
249: this .adaptee = adaptee;
250: }
251:
252: /**
253: * @param locale
254: */
255: public GeoToolsWriteParams(final ImageWriteParam adaptee,
256: Locale locale) {
257:
258: super (locale);
259: this .adaptee = adaptee;
260: }
261:
262: public final ImageWriteParam getAdaptee() {
263: return adaptee;
264: }
265:
266: }
|