javax.media.jai.tilecodec
Class TileCodecParameterList

java.lang.Object
  extended byjavax.media.jai.ParameterListImpl
      extended byjavax.media.jai.tilecodec.TileCodecParameterList
All Implemented Interfaces:
ParameterList, Serializable

public class TileCodecParameterList
extends ParameterListImpl

A subclass of ParameterListImpl that is specific to tile codecs. This class functions in either one or both of the two registry modes supported by the TileCodecDescriptor - "tileEncoder" and "tileDecoder".

This class is not intended to be subclassed for each individual TileEncoder or TileDecoder. This is a generic class which can be used as is for representing a parameter list for any tile encoding/decoding format. The ParameterListDescriptor provided as argument to the constructor should be the one returned from the getParameterListDescriptor() method of the TileCodecDescriptor for the given format name.

If the associated TileCodecDescriptor's includesSampleModelInfo() method returns false, then for the "tileDecoder" mode, this class will be expected to contain a parameter named "sampleModel" with a non-null SampleModel as its value.

Since:
JAI 1.1
See Also:
Serialized Form

Constructor Summary
TileCodecParameterList(String formatName, String[] validModes, ParameterListDescriptor descriptor)
          Creates a TileCodecParameterList.
 
Method Summary
 String getFormatName()
          Returns the name of the format which this parameter list describes.
 String[] getValidModes()
          Returns all the modes that this TileCodecParameterList is valid for, as a String array.
 boolean isValidForMode(String registryModeName)
          Returns true if the parameters in this TileCodecParameterList are valid for the specified registry mode name, false otherwise.
 
Methods inherited from class javax.media.jai.ParameterListImpl
getBooleanParameter, getByteParameter, getCharParameter, getDoubleParameter, getFloatParameter, getIntParameter, getLongParameter, getObjectParameter, getParameterListDescriptor, getShortParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TileCodecParameterList

public TileCodecParameterList(String formatName,
                              String[] validModes,
                              ParameterListDescriptor descriptor)
Creates a TileCodecParameterList. The validModes argument specifies the registry modes valid for this TileCodecParameterList. This should contain the "tileEncoder" registry mode or the "tileDecoder" registry mode or both. The supplied descriptor object specifies the names and number of the valid parameters, their Class types, as well as the Range of valid values for each parameter.

Parameters:
formatName - The name of the format, parameters for which are specified through this parameter list.
validModes - An array of String objects specifying which registry modes are valid for this parameter list.
descriptor - The ParameterListDescriptor object that describes all valid parameters for this format. This must be the the same descriptor that is returned from the getParameterListDescriptor() method of the TileCodecDescriptor for the given formatName.
Throws:
IllegalArgumentException - if formatName is null.
IllegalArgumentException - if validModes is null.
IllegalArgumentException - if descriptor is null.
Method Detail

getFormatName

public String getFormatName()
Returns the name of the format which this parameter list describes.


isValidForMode

public boolean isValidForMode(String registryModeName)
Returns true if the parameters in this TileCodecParameterList are valid for the specified registry mode name, false otherwise. The valid modes for this class are the "tileEncoder" registry mode, and the "tileDecoder" registry mode.


getValidModes

public String[] getValidModes()
Returns all the modes that this TileCodecParameterList is valid for, as a String array.