org.geotoolkit.factory
Class Hints

Object
  extended by RenderingHints
      extended by Hints
All Implemented Interfaces:
Cloneable, Map<Object,Object>

public class Hints
extends RenderingHints

A set of hints providing control on factories to be used. They provides a way to control low-level details. When hints are used in conjunction with factory registry (the Geotk service discovery mechanism), we have the complete Geotk plugin system. By using hints to allow application code to effect service discovery, we allow client code to retarget the Geotk library for their needs.

The following example fetch a coordinate operation factory which is tolerant to the lack of Bursa-Wolf parameters:

Hints hints = new Hints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE);
CoordinateOperationFactory factory = FactoryFinder.getCoordinateOperationFactory(hints);
Hints may be ignored if they do not apply to the object to be instantiated.

Since:
2.0
Version:
3.18
Author:
Martin Desruisseaux (IRD, Geomatys), Jody Garnett (Refractions)
See Also:
Factory, FactoryRegistry
Module:
utility/geotk-utility (download)    View source code for this class

Nested Class Summary
static class Hints.ClassKey
          A key for value that may be specified either as instance of T, or as Class<T>.
static class Hints.FileKey
          Key for hints to be specified as a File.
static class Hints.IntegerKey
          A hint used to capture a configuration setting as an integer.
static class Hints.Key
          The type for keys used to control various aspects of the factory creation.
static class Hints.OptionKey
          Key that allows the choice of several options.
 
Nested classes/interfaces inherited from interface Map
Map.Entry<K,V>
 
Field Summary
static Hints.ClassKey AGGREGATE_FACTORY
          The AggregateFactory instance to use.
static Hints.ClassKey CITATION_FACTORY
          The CitationFactory instance to use.
static Hints.ClassKey COMPLEX_FACTORY
          The ComplexFactory instance to use.
static Hints.ClassKey COORDINATE_OPERATION_AUTHORITY_FACTORY
          The CoordinateOperationAuthorityFactory instance to use.
static Hints.ClassKey COORDINATE_OPERATION_FACTORY
          The CoordinateOperationFactory instance to use.
static Hints.Key COVERAGE_PROCESSING_VIEW
          Forces the grid coverage processor to perform operations on the specified view.
static Hints.FileKey CRS_AUTHORITY_EXTRA_DIRECTORY
          Used to direct WKT CRS Authority to a directory containing extra definitions.
static Hints.ClassKey CRS_AUTHORITY_FACTORY
          The CRSAuthorityFactory instance to use.
static Hints.ClassKey CRS_FACTORY
          The CRSFactory instance to use.
static Hints.ClassKey CS_AUTHORITY_FACTORY
          The CSAuthorityFactory instance to use.
static Hints.ClassKey CS_FACTORY
          The CSFactory instance to use.
static Hints.ClassKey DATUM_AUTHORITY_FACTORY
          The DatumAuthorityFactory instance to use.
static Hints.ClassKey DATUM_FACTORY
          The DatumFactory instance to use.
static Hints.OptionKey DATUM_SHIFT_METHOD
          The preferred datum shift method to use for coordinate operations.
static Hints.Key DEFAULT_COORDINATE_REFERENCE_SYSTEM
          The default CoordinateReferenceSystem to use.
static Hints.Key EPSG_DATA_SOURCE
          The data source name to lookup from JNDI when initializing the EPSG factory.
static Hints.ClassKey FEATURE_FACTORY
          The FeatureFactory instance to use.
static Hints.ClassKey FEATURE_TYPE_FACTORY
          The FeatureTypeFactory instance to use.
static Hints.ClassKey FILTER_FACTORY
          The FilterFactory instance to use.
static Hints.Key FORCE_AXIS_ORDER_HONORING
          Applies the FORCE_LONGITUDE_FIRST_AXIS_ORDER hint to some factories that usually ignore it.
static Hints.Key FORCE_LONGITUDE_FIRST_AXIS_ORDER
          Tells if the coordinate systems created by an authority factory should be forced to (longitude, latitude) axis order.
static Hints.Key FORCE_STANDARD_AXIS_DIRECTIONS
          Tells if the coordinate systems created by an authority factory should be forced to standard axis directions.
static Hints.Key FORCE_STANDARD_AXIS_UNITS
          Tells if the coordinate systems created by an authority factory should be forced to standard axis units.
static Hints.ClassKey GEOMETRY_FACTORY
          The GeometryFactory instance to use.
static Hints.ClassKey GRID_COVERAGE_PROCESSOR
          The GridCoverageProcessor instance to use.
static Hints.Key JAI_INSTANCE
          The JAI instance to use.
static Hints.Key LENIENT_DATUM_SHIFT
          Tells if coordinate operations should be allowed even when a datum shift is required while no method is found applicable.
static Hints.ClassKey MATH_TRANSFORM_FACTORY
          The MathTransformFactory instance to use.
static Hints.ClassKey NAME_FACTORY
          The NameFactory instance to use.
static Hints.ClassKey POSITION_FACTORY
          The PositionFactory instance to use.
static Hints.ClassKey PRIMITIVE_FACTORY
          The PrimitiveFactory instance to use.
static Hints.Key SAMPLE_DIMENSION_TYPE
          The SampleDimensionType to use.
static Hints.ClassKey STYLE_FACTORY
          The StyleFactory instance to use.
static Hints.ClassKey TEMPORAL_FACTORY
          The TemporalFactory instance to use.
static Hints.Key TILE_ENCODING
          The tile encoder name (as a String value) to use during serialization of image data in a GridCoverage2D object.
static Hints.Key VERSION
          Version number of the requested service.
 
Fields inherited from class RenderingHints
KEY_ALPHA_INTERPOLATION, KEY_ANTIALIASING, KEY_COLOR_RENDERING, KEY_DITHERING, KEY_FRACTIONALMETRICS, KEY_INTERPOLATION, KEY_RENDERING, KEY_STROKE_CONTROL, KEY_TEXT_ANTIALIASING, KEY_TEXT_LCD_CONTRAST, VALUE_ALPHA_INTERPOLATION_DEFAULT, VALUE_ALPHA_INTERPOLATION_QUALITY, VALUE_ALPHA_INTERPOLATION_SPEED, VALUE_ANTIALIAS_DEFAULT, VALUE_ANTIALIAS_OFF, VALUE_ANTIALIAS_ON, VALUE_COLOR_RENDER_DEFAULT, VALUE_COLOR_RENDER_QUALITY, VALUE_COLOR_RENDER_SPEED, VALUE_DITHER_DEFAULT, VALUE_DITHER_DISABLE, VALUE_DITHER_ENABLE, VALUE_FRACTIONALMETRICS_DEFAULT, VALUE_FRACTIONALMETRICS_OFF, VALUE_FRACTIONALMETRICS_ON, VALUE_INTERPOLATION_BICUBIC, VALUE_INTERPOLATION_BILINEAR, VALUE_INTERPOLATION_NEAREST_NEIGHBOR, VALUE_RENDER_DEFAULT, VALUE_RENDER_QUALITY, VALUE_RENDER_SPEED, VALUE_STROKE_DEFAULT, VALUE_STROKE_NORMALIZE, VALUE_STROKE_PURE, VALUE_TEXT_ANTIALIAS_DEFAULT, VALUE_TEXT_ANTIALIAS_GASP, VALUE_TEXT_ANTIALIAS_LCD_HBGR, VALUE_TEXT_ANTIALIAS_LCD_HRGB, VALUE_TEXT_ANTIALIAS_LCD_VBGR, VALUE_TEXT_ANTIALIAS_LCD_VRGB, VALUE_TEXT_ANTIALIAS_OFF, VALUE_TEXT_ANTIALIAS_ON
 
Constructor Summary
Hints()
          Constructs a map of hints initialized with the system-wide default values.
Hints(Map<? extends RenderingHints.Key,?> hints)
          Constructs a new object with keys and values from the given map (which may be null).
Hints(RenderingHints.Key key, Object value)
          Constructs a new map of hints with the specified key/value pair.
Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2)
          Constructs a new map of hints with two key/value pairs.
Hints(RenderingHints.Key key1, Object value1, RenderingHints.Key key2, Object value2, Object... pairs)
          Constructs a new map of hints from key/value pairs.
Hints(RenderingHints hints)
          Constructs a new object with keys and values from the given map (which may be null).
 
Method Summary
 Hints clone()
          Returns a new map of hints with the same content than this map.
static Object getSystemDefault(RenderingHints.Key key)
          Returns the system-wide default value for the given key.
static Object putSystemDefault(RenderingHints.Key key, Object value)
          Adds or modifies a system-wide default value.
static Object removeSystemDefault(RenderingHints.Key key)
          Removes the specified hints from the set of system default values.
 String toString()
          Returns a string representation of the hints.
 
Methods inherited from class RenderingHints
add, clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_FACTORY

public static final Hints.ClassKey NAME_FACTORY
The NameFactory instance to use.

Since:
3.00
See Also:
FactoryFinder.getNameFactory(Hints)

CITATION_FACTORY

public static final Hints.ClassKey CITATION_FACTORY
The CitationFactory instance to use.

Since:
3.00
See Also:
FactoryFinder.getCitationFactory(Hints)

CRS_AUTHORITY_FACTORY

public static final Hints.ClassKey CRS_AUTHORITY_FACTORY
The CRSAuthorityFactory instance to use.

See Also:
AuthorityFactoryFinder.getCRSAuthorityFactory(String, Hints)

CS_AUTHORITY_FACTORY

public static final Hints.ClassKey CS_AUTHORITY_FACTORY
The CSAuthorityFactory instance to use.

See Also:
AuthorityFactoryFinder.getCSAuthorityFactory(String, Hints)

DATUM_AUTHORITY_FACTORY

public static final Hints.ClassKey DATUM_AUTHORITY_FACTORY
The DatumAuthorityFactory instance to use.

See Also:
AuthorityFactoryFinder.getDatumAuthorityFactory(String, Hints)

CRS_FACTORY

public static final Hints.ClassKey CRS_FACTORY
The CRSFactory instance to use.

See Also:
FactoryFinder.getCRSFactory(Hints)

CS_FACTORY

public static final Hints.ClassKey CS_FACTORY
The CSFactory instance to use.

See Also:
FactoryFinder.getCSFactory(Hints)

DATUM_FACTORY

public static final Hints.ClassKey DATUM_FACTORY
The DatumFactory instance to use.

See Also:
FactoryFinder.getDatumFactory(Hints)

COORDINATE_OPERATION_FACTORY

public static final Hints.ClassKey COORDINATE_OPERATION_FACTORY
The CoordinateOperationFactory instance to use.

See Also:
FactoryFinder.getCoordinateOperationFactory(Hints)

COORDINATE_OPERATION_AUTHORITY_FACTORY

public static final Hints.ClassKey COORDINATE_OPERATION_AUTHORITY_FACTORY
The CoordinateOperationAuthorityFactory instance to use.

See Also:
AuthorityFactoryFinder.getCoordinateOperationAuthorityFactory(String, Hints)

MATH_TRANSFORM_FACTORY

public static final Hints.ClassKey MATH_TRANSFORM_FACTORY
The MathTransformFactory instance to use.

See Also:
FactoryFinder.getMathTransformFactory(Hints)

DEFAULT_COORDINATE_REFERENCE_SYSTEM

public static final Hints.Key DEFAULT_COORDINATE_REFERENCE_SYSTEM
The default CoordinateReferenceSystem to use. This is used by some factories capable to provide a default CRS when no one were explicitly specified by the user.

Since:
2.2

CRS_AUTHORITY_EXTRA_DIRECTORY

public static final Hints.FileKey CRS_AUTHORITY_EXTRA_DIRECTORY
Used to direct WKT CRS Authority to a directory containing extra definitions. The value should be an instance of File or String refering to an existing directory.

Filenames in the supplied directory should be of the form authority.properties where authority is the authority name space to use. For example the "epsg.properties" file contains extra CRS to add as new EPSG codes.

Since:
2.4

EPSG_DATA_SOURCE

public static final Hints.Key EPSG_DATA_SOURCE
The data source name to lookup from JNDI when initializing the EPSG factory. Possible values:

Since:
2.4

DATUM_SHIFT_METHOD

public static final Hints.OptionKey DATUM_SHIFT_METHOD
The preferred datum shift method to use for coordinate operations. Valid values include "Molodensky", "Abridged Molodensky" and "Geocentric". Other values may be supplied if a math transform exists for that name, but this is not guaranteed to work.

See Also:
FactoryFinder.getCoordinateOperationFactory(Hints)

LENIENT_DATUM_SHIFT

public static final Hints.Key LENIENT_DATUM_SHIFT
Tells if coordinate operations should be allowed even when a datum shift is required while no method is found applicable. It may be for example that no Bursa Wolf parameters were found for a datum shift. The default value is FALSE, which means that coordinate operation factory throws an exception if such a case occurs.

If this hint is set to TRUE, then the users are encouraged to check the coordinate operation accuracy for every transformation created. If the set of operation accuracy contains DATUM_SHIFT_OMITTED, this means that an "ellipsoid shift" were applied without real datum shift method available, and the transformed coordinates may have one kilometer error. The application should warn the user (e.g. popup a message dialog box) in such case.

See Also:
FactoryFinder.getCoordinateOperationFactory(Hints)

FORCE_LONGITUDE_FIRST_AXIS_ORDER

public static final Hints.Key FORCE_LONGITUDE_FIRST_AXIS_ORDER
Tells if the coordinate systems created by an authority factory should be forced to (longitude, latitude) axis order. This hint is especially useful for creating coordinate reference system objects from EPSG codes. Most geographic CRS defined in the EPSG database use (latitude, longitude) axis order. Unfortunately, many data sources available in the world use the opposite axis order and still claim to use a CRS described by an EPSG code. This hint allows to handle such data.

This hint can be passed to the AuthorityFactoryFinder.getCRSAuthorityFactory(...) method. Whatever this hint is supported or not is authority dependent. In the default Geotk configuration, this hint is honored for codes in the "EPSG" namespace but ignored for codes in the "urn:ogc" namespace. See FORCE_AXIS_ORDER_HONORING for changing this behavior.

Note: The documentation saids "longitude first" for simplicity, because the axes reordering apply mostly to geographic CRS (in contrast, most projected CRS already have (x, y) axis order, in which case this hint has no effect). However, what Geotk actually does is to force a right-handed coordinate system. This approach works for projected CRS as well as geographic CRS ("longitude first" is an inappropriate expression for projected CRS). It even works in cases like stereographic projections, where the axes names look like (South along 180°, South along 90°E). In such cases, aiming for "longitude first" would not make sense.

Since:
2.3
See Also:
AuthorityFactoryFinder.getCSAuthorityFactory(String, Hints), AuthorityFactoryFinder.getCRSAuthorityFactory(String, Hints), OrderedAxisAuthorityFactory, LongitudeFirstEpsgFactory

FORCE_AXIS_ORDER_HONORING

public static final Hints.Key FORCE_AXIS_ORDER_HONORING
Applies the FORCE_LONGITUDE_FIRST_AXIS_ORDER hint to some factories that usually ignore it. The axis order issue is of concern mostly to the "EPSG" name space. Codes in the "http://www.opengis.net/gml/srs/" or "urn:ogc" name space usually ignore the axis order hint, especially the later which is clearly defined by international standards and does not allow the FORCE_LONGITUDE_FIRST_AXIS_ORDER behavior in standard-compliant application.

If nevertheless a user really wants the FORCE_LONGITUDE_FIRST_AXIS_ORDER behavior despite the violation of standards, then he must explicitly assigns a comma separated list of authorities to this FORCE_AXIS_ORDER_HONORING hint. For example in order to apply the (longitude, latitude) axis order to "http://www.opengis.net/" and "urn:ogc" name spaces in addition of EPSG, use the following hints:

hints.put(FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
hints.put(FORCE_AXIS_ORDER_HONORING, "epsg, http, urn");
Let stress again that the application of (longitude, latitude) axis order to the "urn:ogc" name space is a clear violation of OGC specification, which is why Geotk wants you to provide this additional hint meaning "I'm really sure". Note also that "epsg" is implicit and doesn't need to be included in the above list, but this example does so as a matter of principle.

Since:
2.4

FORCE_STANDARD_AXIS_DIRECTIONS

public static final Hints.Key FORCE_STANDARD_AXIS_DIRECTIONS
Tells if the coordinate systems created by an authority factory should be forced to standard axis directions. If true, then South axis directions are forced to North, West axis directions are forced to East, etc. If false, then the axis directions are left unchanged.

This hint shall be passed to the AuthorityFactoryFinder.getCRSAuthorityFactory(...) method. Whatever this hint is supported or not is authority dependent.

Since:
2.3
See Also:
FactoryFinder.getCSFactory(Hints), FactoryFinder.getCRSFactory(Hints), OrderedAxisAuthorityFactory

FORCE_STANDARD_AXIS_UNITS

public static final Hints.Key FORCE_STANDARD_AXIS_UNITS
Tells if the coordinate systems created by an authority factory should be forced to standard axis units. If true, then all angular units are forced to degrees and linear units to meters. If false, then the axis units are left unchanged.

This hint shall be passed to the AuthorityFactoryFinder.getCRSAuthorityFactory(...) method. Whatever this hint is supported or not is authority dependent.

Since:
2.3
See Also:
FactoryFinder.getCSFactory(Hints), FactoryFinder.getCRSFactory(Hints), OrderedAxisAuthorityFactory

VERSION

public static final Hints.Key VERSION
Version number of the requested service. This hint is used for example in order to get a CRS authority factory backed by a particular version of EPSG database. The value should be an instance of Version.

Since:
2.4

JAI_INSTANCE

public static final Hints.Key JAI_INSTANCE
The JAI instance to use.


TILE_ENCODING

public static final Hints.Key TILE_ENCODING
The tile encoder name (as a String value) to use during serialization of image data in a GridCoverage2D object. This encoding is given to the SerializableRenderedImage constructor. Valid values include (but is not limited to) "raw", "gzip" and "jpeg".
Note: We recommend to avoid the "jpeg" codec for grid coverages.

Since:
2.3
See Also:
CoverageFactoryFinder.getGridCoverageFactory(Hints)

GRID_COVERAGE_PROCESSOR

public static final Hints.ClassKey GRID_COVERAGE_PROCESSOR
The GridCoverageProcessor instance to use.

See Also:
CoverageFactoryFinder.getCoverageProcessor(Hints)

COVERAGE_PROCESSING_VIEW

public static final Hints.Key COVERAGE_PROCESSING_VIEW
Forces the grid coverage processor to perform operations on the specified view.

Some operation when called on a grid coverage tries to converts to geophysics view before to execute. The rationale behind this is that the other views are just the rendered version of a coverage data, and operations like interpolations have a physical meaning only when applied on the geophysics view (e.g. interpolate Sea Surface Temperature (SST) values, not the RGB values that colorize the temperature).

However, in some cases like when doing pure rendering of images, we might want to force operations to work on photographic view directly, even performing color expansions as needed. This can be accomplished by setting this hint to the desired view. Be aware that interpolations after color expansions may produce colors that do not accuratly represent the geophysical value.

Since:
2.5

SAMPLE_DIMENSION_TYPE

public static final Hints.Key SAMPLE_DIMENSION_TYPE
The SampleDimensionType to use.


TEMPORAL_FACTORY

public static final Hints.ClassKey TEMPORAL_FACTORY
The TemporalFactory instance to use.

Since:
3.18
See Also:
FactoryFinder.getTemporalFactory(Hints)

POSITION_FACTORY

public static final Hints.ClassKey POSITION_FACTORY
The PositionFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getPositionFactory(Hints)

PRIMITIVE_FACTORY

public static final Hints.ClassKey PRIMITIVE_FACTORY
The PrimitiveFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getPrimitiveFactory(Hints)

GEOMETRY_FACTORY

public static final Hints.ClassKey GEOMETRY_FACTORY
The GeometryFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getGeometryFactory(Hints)

COMPLEX_FACTORY

public static final Hints.ClassKey COMPLEX_FACTORY
The ComplexFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getComplexFactory(Hints)

AGGREGATE_FACTORY

public static final Hints.ClassKey AGGREGATE_FACTORY
The AggregateFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getAggregateFactory(Hints)

FEATURE_TYPE_FACTORY

public static final Hints.ClassKey FEATURE_TYPE_FACTORY
The FeatureTypeFactory instance to use.

Since:
3.15
See Also:
FactoryFinder.getFeatureTypeFactory(Hints)

FEATURE_FACTORY

public static final Hints.ClassKey FEATURE_FACTORY
The FeatureFactory instance to use.

Since:
3.01
See Also:
FactoryFinder.getFeatureFactory(Hints)

FILTER_FACTORY

public static final Hints.ClassKey FILTER_FACTORY
The FilterFactory instance to use.

Since:
3.00
See Also:
FactoryFinder.getFilterFactory(Hints)

STYLE_FACTORY

public static final Hints.ClassKey STYLE_FACTORY
The StyleFactory instance to use.

Since:
3.00
See Also:
FactoryFinder.getStyleFactory(Hints)
Constructor Detail

Hints

public Hints()
Constructs a map of hints initialized with the system-wide default values. The default values are those that were given to putSystemDefault and not yet removed with removeSystemDefault.

Since:
2.5

Hints

public Hints(RenderingHints.Key key,
             Object value)
Constructs a new map of hints with the specified key/value pair. First, an initial map is created as with the no-argument constructor. This map may not be empty. Then, the given key-value pair is added. If a default value was present for the given key, then the given value replaces the default one.

Parameters:
key - The key of the particular hint property.
value - The value of the hint property specified with key.

Hints

public Hints(RenderingHints.Key key1,
             Object value1,
             RenderingHints.Key key2,
             Object value2)
Constructs a new map of hints with two key/value pairs. First, an initial map is created as with the no-argument constructor. This map may not be empty. Then, the given key-value pairs are added. If a default value was present for a given key, then the given value replaces the default one.

Parameters:
key1 - The key for the first pair.
value1 - The value for the first pair.
key2 - The key2 for the second pair.
value2 - The value2 for the second pair.
Since:
2.4

Hints

public Hints(RenderingHints.Key key1,
             Object value1,
             RenderingHints.Key key2,
             Object value2,
             Object... pairs)
Constructs a new map of hints from key/value pairs. First, an initial map is created as with the no-argument constructor. This map may not be empty. Then, the given key-value pairs are added. If a default value was present for a given key, then the given value replaces the default one.

Parameters:
key1 - The key for the first pair.
value1 - The value for the first pair.
key2 - The key2 for the second pair.
value2 - The value2 for the second pair.
pairs - Additional pairs of keys and values.
Since:
2.4

Hints

public Hints(Map<? extends RenderingHints.Key,?> hints)
Constructs a new object with keys and values from the given map (which may be null). First, an initial map is created as with the no-argument constructor. This map may not be empty. Then, the given key-value pairs are added. If a default value was presents for a given key, then the given value replace the default one.

Parameters:
hints - A map of key/value pairs to initialize the hints, or null if none.

Hints

public Hints(RenderingHints hints)
Constructs a new object with keys and values from the given map (which may be null). First, an initial map is created as with the no-argument constructor. This map may not be empty. Then, the given key-value pairs are added. If a default value was presents for a given key, then the given value replace the default one.

Parameters:
hints - A map of key/value pairs to initialize the hints, or null if none.
Since:
2.5
Method Detail

clone

public Hints clone()
Returns a new map of hints with the same content than this map.

Overrides:
clone in class RenderingHints
Since:
2.5

getSystemDefault

public static Object getSystemDefault(RenderingHints.Key key)
Returns the system-wide default value for the given key. The Geotk library initially contains no system default, so getSystemDefault(key) returns null for all keys. Users can add default values using putSystemDefault.

To get a map of all system defaults, use new Hints().

Parameters:
key - The hints key.
Returns:
The system-wide default value for the given key, or null if the key did not have a mapping.
Since:
2.4

putSystemDefault

@Configuration
public static Object putSystemDefault(RenderingHints.Key key,
                                                    Object value)
Adds or modifies a system-wide default value. Hints instances created after this method call will be initialized to the union of all values specified with putSystemDefault and not yet removed.

If the given value is different than the previous one, then this method notifies every listeners registered with Factories.addChangeListener(ChangeListener).

Parameters:
key - The hint key.
value - The hint value to be used as the system-wide default for the given key.
Returns:
The previous value for the given key, or null if none.
Throws:
IllegalArgumentException - if Hints.Key.isCompatibleValue(Object) returns false for the given value.
Since:
2.4

removeSystemDefault

@Configuration
public static Object removeSystemDefault(RenderingHints.Key key)
Removes the specified hints from the set of system default values. If the a value was present for the given key, then this method notifies every listeners registered with Factories.addChangeListener(ChangeListener).

Parameters:
key - The hints key that needs to be removed.
Returns:
The value to which the key had previously been mapped, or null if the key did not have a mapping.
Since:
2.4

toString

public String toString()
Returns a string representation of the hints. The default implementation formats the set of hints as a tree.

Overrides:
toString in class RenderingHints
Since:
2.4


Copyright © 2009-2013 Geotoolkit.org. All Rights Reserved.