/**
 * 
 */
package org.geotools.coverage.grid.io.imageio;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.Locale;

import javax.imageio.IIOParamController;
import javax.imageio.ImageTypeSpecifier;
import javax.imageio.ImageWriteParam;

/**
 * @author Simone Giannecchini
 * @since 2.3.x
 * 
 */
public abstract class GeoToolsWriteParams extends ImageWriteParam {

	protected ImageWriteParam adaptee;

	public boolean canWriteCompressed() {
		return adaptee.canWriteCompressed();
	}

	public boolean canWriteProgressive() {

		return adaptee.canWriteProgressive();
	}

	public boolean canWriteTiles() {

		return adaptee.canWriteTiles();
	}

	public float getBitRate(float quality) {

		return adaptee.getBitRate(quality);
	}

	public int getCompressionMode() {

		return adaptee.getCompressionMode();
	}

	public float getCompressionQuality() {

		return adaptee.getCompressionQuality();
	}

	public String[] getCompressionQualityDescriptions() {

		return adaptee.getCompressionQualityDescriptions();
	}

	public float[] getCompressionQualityValues() {

		return adaptee.getCompressionQualityValues();
	}

	public String getCompressionType() {

		return adaptee.getCompressionType();
	}

	public String[] getCompressionTypes() {

		return adaptee.getCompressionTypes();
	}

	public String getLocalizedCompressionTypeName() {

		return adaptee.getLocalizedCompressionTypeName();
	}

	public Dimension[] getPreferredTileSizes() {

		return adaptee.getPreferredTileSizes();
	}

	public int getProgressiveMode() {

		return adaptee.getProgressiveMode();
	}

	public int getTileHeight() {

		return adaptee.getTileHeight();
	}

	public int getTileWidth() {

		return adaptee.getTileWidth();
	}

	public int getTilingMode() {

		return adaptee.getTilingMode();
	}

	public boolean isCompressionLossless() {

		return adaptee.isCompressionLossless();
	}

	public void setCompressionMode(int mode) {

		adaptee.setCompressionMode(mode);
	}

	public void setCompressionQuality(float quality) {

		adaptee.setCompressionQuality(quality);
	}

	public void setCompressionType(String compressionType) {

		adaptee.setCompressionType(compressionType);
	}

	public void setProgressiveMode(int mode) {

		adaptee.setProgressiveMode(mode);
	}

	public void setTiling(int tileWidth, int tileHeight) {

		adaptee.setTiling(tileWidth, tileHeight, 0,
				0);
	}

	public void setTilingMode(int mode) {

		adaptee.setTilingMode(mode);
	}

	public void unsetCompression() {

		adaptee.unsetCompression();
	}

	public void unsetTiling() {

		adaptee.unsetTiling();
	}

	public void setDestinationType(ImageTypeSpecifier destinationType) {

		adaptee.setDestinationType(destinationType);
	}

	public boolean canOffsetTiles() {
		return false;
	}

	public Locale getLocale() {
		return adaptee.getLocale();
	}

	public int getTileGridXOffset() {
		return adaptee.getTileGridXOffset();
	}

	public int getTileGridYOffset() {
		return adaptee.getTileGridYOffset();
	}

	public boolean activateController() {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public IIOParamController getController() {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public IIOParamController getDefaultController() {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public Point getDestinationOffset() {
		return adaptee.getDestinationOffset();
	}

	public ImageTypeSpecifier getDestinationType() {
		return adaptee.getDestinationType();
	}

	public int[] getSourceBands() {
		return adaptee.getSourceBands();
	}

	public Rectangle getSourceRegion() {
		return adaptee.getSourceRegion();
	}

	public int getSourceXSubsampling() {
		return adaptee.getSourceXSubsampling();
	}

	public int getSourceYSubsampling() {
		return adaptee.getSourceYSubsampling();
	}

	public int getSubsamplingXOffset() {
		return adaptee.getSubsamplingXOffset();
	}

	public int getSubsamplingYOffset() {
		return adaptee.getSubsamplingYOffset();
	}

	public boolean hasController() {
		return false;
	}

	public void setController(IIOParamController controller) {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public void setDestinationOffset(Point destinationOffset) {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public void setSourceBands(int[] sourceBands) {
		adaptee.setSourceBands(sourceBands);
	}

	public void setSourceRegion(Rectangle sourceRegion) {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	public void setSourceSubsampling(int sourceXSubsampling,
			int sourceYSubsampling, int subsamplingXOffset,
			int subsamplingYOffset) {
		throw new UnsupportedOperationException(
				"This operation is not currently supported by this API");
	}

	/**
	 * 
	 */
	public GeoToolsWriteParams(final ImageWriteParam adaptee) {
		this.adaptee = adaptee;
	}

	/**
	 * @param locale
	 */
	public GeoToolsWriteParams(final ImageWriteParam adaptee, Locale locale) {

		super(locale);
		this.adaptee = adaptee;
	}

	public final ImageWriteParam getAdaptee() {
		return adaptee;
	}
	


}
