ilog.views.maps
Class IlvAbstractCoordinateFormatter

java.lang.Object
  extended by ilog.views.maps.IlvAbstractCoordinateFormatter
All Implemented Interfaces:
IlvPersistentObject, IlvCoordinateFormatter
Direct Known Subclasses:
IlvDecimalCoordinateFormatter, IlvDMSCoordinateFormatter, IlvGeocentricCoordinateFormater, IlvGeodesicCoordinateFormatter, IlvUTMCoordinateFormatter

public abstract class IlvAbstractCoordinateFormatter
extends Object
implements IlvCoordinateFormatter

This abstract coordinate system is the manages common formatter properties such as:

Since:
JViews 7.5

Constructor Summary
IlvAbstractCoordinateFormatter()
          Default constructor.
IlvAbstractCoordinateFormatter(IlvInputStream stream)
          Creates a new IlvDefaultAltitudeProvider from an IlvInputStream.
 
Method Summary
 boolean equals(Object other)
          Overrides deep comparison equals.
protected  IlvEllipsoid getEllipsoid()
          Returns the ellipsoid.
 String getInputSeparator()
          Returns the input Separator.
 String getOutputSeparator()
          Returns the output Separator.
protected  int getPrecision()
          Returns the precision.
 int hashCode()
          
 void setCoordinatePrecision(int precision)
          Sets the Sets the maximum number of digits allowed in the fraction portion of a coordinate.
 void setEllipsoid(IlvEllipsoid ellipsoid)
          Sets the ellipsoid associated with this coordinate format.
 void setOutputSeparator(String separator)
          Changes the separator string that will be used to separate the different parts of output string in the toString method.
 void setParseSeparator(char separator)
          Changes the separator character that will be used to analyze the string passed to the parse method.
protected  void setPrecision(int precision)
          Sets the precision of coordinates (number of digits after dot).
protected abstract  void setupFormatters()
          This method is called after precision has been changed and should update the internal number formatters, if any.
 void write(IlvOutputStream stream)
          Writes the attributes of a persistent object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.views.maps.IlvCoordinateFormatter
getAngleString, getLatitude, getLongitude, parse, setLonLat, toString
 

Constructor Detail

IlvAbstractCoordinateFormatter

public IlvAbstractCoordinateFormatter()
Default constructor. Uses a space character as parse separator and output separator.


IlvAbstractCoordinateFormatter

public IlvAbstractCoordinateFormatter(IlvInputStream stream)
                               throws IlvReadFileException
Creates a new IlvDefaultAltitudeProvider from an IlvInputStream. Default implementation does nothing.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if an error occurs while reading.
Method Detail

getPrecision

protected int getPrecision()
Returns the precision.

Returns:
Returns the precision.

setPrecision

protected void setPrecision(int precision)
Sets the precision of coordinates (number of digits after dot).

Parameters:
precision - The precision to set.

setCoordinatePrecision

public final void setCoordinatePrecision(int precision)
Sets the Sets the maximum number of digits allowed in the fraction portion of a coordinate.

Specified by:
setCoordinatePrecision in interface IlvCoordinateFormatter
Parameters:
precision - precision to use for displaying coordinates.
See Also:
IlvCoordinateFormatter.setCoordinatePrecision(int)

setEllipsoid

public void setEllipsoid(IlvEllipsoid ellipsoid)
Sets the ellipsoid associated with this coordinate format.

Specified by:
setEllipsoid in interface IlvCoordinateFormatter
Parameters:
ellipsoid - ellipsoid to use for conversions.
See Also:
IlvCoordinateFormatter.setEllipsoid(ilog.views.maps.projection.IlvEllipsoid)

setOutputSeparator

public final void setOutputSeparator(String separator)
Changes the separator string that will be used to separate the different parts of output string in the toString method.

Specified by:
setOutputSeparator in interface IlvCoordinateFormatter
Parameters:
separator - the separator string.
See Also:
IlvCoordinateFormatter.setOutputSeparator(java.lang.String)

setParseSeparator

public final void setParseSeparator(char separator)
Changes the separator character that will be used to analyze the string passed to the parse method.

Specified by:
setParseSeparator in interface IlvCoordinateFormatter
Parameters:
separator - the separator character
See Also:
IlvCoordinateFormatter.setParseSeparator(char)

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the attributes of a persistent object.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.
See Also:
IlvPersistentObject.write(ilog.views.io.IlvOutputStream)

getEllipsoid

protected IlvEllipsoid getEllipsoid()
Returns the ellipsoid.

Returns:
Returns the ellipsoid.

getInputSeparator

public String getInputSeparator()
Returns the input Separator.

Returns:
Returns the input Separator.

getOutputSeparator

public String getOutputSeparator()
Returns the output Separator.

Specified by:
getOutputSeparator in interface IlvCoordinateFormatter
Returns:
Returns the outputSeparator.

setupFormatters

protected abstract void setupFormatters()
This method is called after precision has been changed and should update the internal number formatters, if any.


hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides deep comparison equals.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.