org.geotools.pt
Class CoordinateFormat

java.lang.Object
  extended byjava.text.Format
      extended byorg.geotools.measure.CoordinateFormat
          extended byorg.geotools.pt.CoordinateFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
MouseCoordinateFormat

Deprecated. Replaced by CoordinateFormat in the org.geotools.measure package.

public class CoordinateFormat
extends CoordinateFormat

Format a CoordinatePoint in an arbitrary CoordinateSystem.

Version:
$Id: CoordinateFormat.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.text.Format
java.text.Format.Field
 
Constructor Summary
CoordinateFormat()
          Deprecated. Construct a new coordinate format with default locale and WGS 1984 coordinate system.
CoordinateFormat(java.util.Locale locale)
          Deprecated. Construct a new coordinate format for the specified locale and WGS 1984 coordinate system.
CoordinateFormat(java.util.Locale locale, CoordinateSystem cs)
          Deprecated. Construct a new coordinate format for the specified locale and coordinate system.
 
Method Summary
 java.lang.String format(CoordinatePoint point)
          Deprecated. Formats a coordinate point.
 java.lang.StringBuffer format(CoordinatePoint point, java.lang.StringBuffer toAppendTo, java.text.FieldPosition position)
          Deprecated. Formats a coordinate point and appends the resulting text to a given string buffer.
 java.lang.StringBuffer format(java.lang.Object object, java.lang.StringBuffer toAppendTo, java.text.FieldPosition position)
          Deprecated. Formats a coordinate point and appends the resulting text to a given string buffer.
 CoordinateSystem getCoordinateSystem()
          Deprecated. Returns the coordinate system for points to be formatted.
 void setCoordinateSystem(CoordinateSystem cs)
          Deprecated. Set the coordinate system for points to be formatted.
 
Methods inherited from class org.geotools.measure.CoordinateFormat
format, format, getCoordinateReferenceSystem, getFormat, getSeparator, parseObject, setAnglePattern, setCoordinateReferenceSystem, setDatePattern, setNumberPattern, setSeparator, setTimeZone
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinateFormat

public CoordinateFormat()
Deprecated. 
Construct a new coordinate format with default locale and WGS 1984 coordinate system.


CoordinateFormat

public CoordinateFormat(java.util.Locale locale)
Deprecated. 
Construct a new coordinate format for the specified locale and WGS 1984 coordinate system.

Parameters:
locale - The locale for formatting coordinates and numbers.

CoordinateFormat

public CoordinateFormat(java.util.Locale locale,
                        CoordinateSystem cs)
Deprecated. 
Construct a new coordinate format for the specified locale and coordinate system.

Parameters:
locale - The locale for formatting coordinates and numbers.
cs - The output coordinate system.
Method Detail

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
Deprecated. 
Returns the coordinate system for points to be formatted.

Returns:
The output coordinate system.

setCoordinateSystem

public void setCoordinateSystem(CoordinateSystem cs)
Deprecated. 
Set the coordinate system for points to be formatted. The number of dimensions must matched the dimension of points to be formatted.

Parameters:
cs - The new coordinate system.

format

public java.lang.String format(CoordinatePoint point)
Deprecated. 
Formats a coordinate point. The coordinate point dimension must matches the coordinate system dimension.

Parameters:
point - The CoordinatePoint to format.
Returns:
The formatted coordinate point.
Throws:
java.lang.IllegalArgumentException - if this CoordinateFormat cannot format the given object.

format

public java.lang.StringBuffer format(CoordinatePoint point,
                                     java.lang.StringBuffer toAppendTo,
                                     java.text.FieldPosition position)
                              throws java.lang.IllegalArgumentException
Deprecated. 
Formats a coordinate point and appends the resulting text to a given string buffer. The coordinate point dimension must matches the coordinate system dimension.

Parameters:
point - The CoordinatePoint to format.
toAppendTo - Where the text is to be appended.
position - A FieldPosition identifying a field in the formatted text, or null if none.
Returns:
The string buffer passed in as toAppendTo, with formatted text appended.
Throws:
java.lang.IllegalArgumentException - if this CoordinateFormat cannot format the given object.

format

public java.lang.StringBuffer format(java.lang.Object object,
                                     java.lang.StringBuffer toAppendTo,
                                     java.text.FieldPosition position)
                              throws java.lang.IllegalArgumentException
Deprecated. 
Formats a coordinate point and appends the resulting text to a given string buffer. The coordinate point dimension must matches the coordinate system dimension.

Overrides:
format in class CoordinateFormat
Parameters:
object - The CoordinatePoint to format.
toAppendTo - Where the text is to be appended.
position - A FieldPosition identifying a field in the formatted text, or null if none.
Returns:
The string buffer passed in as toAppendTo, with formatted text appended.
Throws:
java.lang.NullPointerException - if toAppendTo is null.
java.lang.IllegalArgumentException - if this CoordinateFormat cannot format the given object.


Copyright © GeoTools. All Rights Reserved.