Java Doc for CoordinateFormat.java in  » GIS » GeoTools-2.4.1 » org » geotools » measure » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.measure 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.text.Format
      org.geotools.measure.CoordinateFormat

CoordinateFormat
public class CoordinateFormat extends Format (Code)
Formats a in an arbitrary . The format for each ordinate is infered from the coordinate system units using the following rules:
  • Ordinate values in are formated as angles using AngleFormat .
  • Ordinate values in any unit compatible with are formated as dates using DateFormat .
  • All other values are formatted as numbers using NumberFormat .
Note: parsing is not yet implemented in this version.
since:
   2.0
version:
   $Id: CoordinateFormat.java 24925 2007-03-27 20:12:08Z jgarnett $
author:
   Martin Desruisseaux



Constructor Summary
public  CoordinateFormat()
     Constructs a new coordinate format with default locale and a two-dimensional coordinate reference system.
public  CoordinateFormat(Locale locale)
     Construct a new coordinate format for the specified locale and a two-dimensional coordinate reference system.
public  CoordinateFormat(Locale locale, CoordinateReferenceSystem crs)
     Constructs a new coordinate format for the specified locale and coordinate reference system.

Method Summary
public  Stringformat(DirectPosition point)
     Formats a direct position.
public  StringBufferformat(DirectPosition point, StringBuffer toAppendTo, FieldPosition position)
     Formats a direct position and appends the resulting text to a given string buffer. The position's dimension must matches the dimension.
Parameters:
  point - The position to format.
Parameters:
  toAppendTo - Where the text is to be appended.
Parameters:
  position - A FieldPosition identifying a field in the formatted text,or null if none.
public  StringBufferformat(Object object, StringBuffer toAppendTo, FieldPosition position)
     Formats a direct position and appends the resulting text to a given string buffer. The position's dimension must matches the dimension.
Parameters:
  object - The DirectPosition to format.
Parameters:
  toAppendTo - Where the text is to be appended.
Parameters:
  position - A FieldPosition identifying a field in the formatted text,or null if none.
public  CoordinateReferenceSystemgetCoordinateReferenceSystem()
     Returns the coordinate reference system for points to be formatted.
public  FormatgetFormat(int dimension)
     Returns the format to use for formatting an ordinate at the given dimension. The dimension parameter range from 0 inclusive to the 's dimension, exclusive.
public  StringgetSeparator()
     Returns the separator between each coordinate (number, angle or date).
public  ObjectparseObject(String source, ParsePosition position)
     Not yet implemented.
public  voidsetAnglePattern(String pattern)
     Set the pattern for angles fields.
public  voidsetCoordinateReferenceSystem(CoordinateReferenceSystem crs)
     Set the coordinate reference system for points to be formatted.
public  voidsetDatePattern(String pattern)
     Set the pattern for dates fields.
public  voidsetNumberPattern(String pattern)
     Set the pattern for numbers fields.
public  voidsetSeparator(String separator)
     Set the separator between each coordinate.
public  voidsetTimeZone(TimeZone timezone)
     Set the time zone for dates fields.


Constructor Detail
CoordinateFormat
public CoordinateFormat()(Code)
Constructs a new coordinate format with default locale and a two-dimensional coordinate reference system.



CoordinateFormat
public CoordinateFormat(Locale locale)(Code)
Construct a new coordinate format for the specified locale and a two-dimensional coordinate reference system.
Parameters:
  locale - The locale for formatting coordinates and numbers.



CoordinateFormat
public CoordinateFormat(Locale locale, CoordinateReferenceSystem crs)(Code)
Constructs a new coordinate format for the specified locale and coordinate reference system.
Parameters:
  locale - The locale for formatting coordinates and numbers.
Parameters:
  crs - The output coordinate reference system.




Method Detail
format
public String format(DirectPosition point)(Code)
Formats a direct position. The position's dimension must matches the dimension.
Parameters:
  point - The position to format. The formatted position.
throws:
  IllegalArgumentException - if this CoordinateFormat cannot format the given object.



format
public StringBuffer format(DirectPosition point, StringBuffer toAppendTo, FieldPosition position) throws IllegalArgumentException(Code)
Formats a direct position and appends the resulting text to a given string buffer. The position's dimension must matches the dimension.
Parameters:
  point - The position to format.
Parameters:
  toAppendTo - Where the text is to be appended.
Parameters:
  position - A FieldPosition identifying a field in the formatted text,or null if none. The string buffer passed in as toAppendTo , with formatted text appended.
throws:
  IllegalArgumentException - if this CoordinateFormat cannot format the given object.



format
public StringBuffer format(Object object, StringBuffer toAppendTo, FieldPosition position) throws IllegalArgumentException(Code)
Formats a direct position and appends the resulting text to a given string buffer. The position's dimension must matches the dimension.
Parameters:
  object - The DirectPosition to format.
Parameters:
  toAppendTo - Where the text is to be appended.
Parameters:
  position - A FieldPosition identifying a field in the formatted text,or null if none. The string buffer passed in as toAppendTo , with formatted text appended.
throws:
  NullPointerException - if toAppendTo is null.
throws:
  IllegalArgumentException - if this CoordinateFormat cannot format the given object.



getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()(Code)
Returns the coordinate reference system for points to be formatted. The output coordinate reference system.



getFormat
public Format getFormat(int dimension) throws IndexOutOfBoundsException(Code)
Returns the format to use for formatting an ordinate at the given dimension. The dimension parameter range from 0 inclusive to the 's dimension, exclusive. This method returns a direct reference to the internal format; any change to the returned Format object will change the formatting for this CoordinateFormat object.
Parameters:
  dimension - The dimension for the ordinate to format. The format for the given dimension.
throws:
  IndexOutOfBoundsException - if dimension is out of range.



getSeparator
public String getSeparator()(Code)
Returns the separator between each coordinate (number, angle or date).
since:
   2.2



parseObject
public Object parseObject(String source, ParsePosition position)(Code)
Not yet implemented.



setAnglePattern
public void setAnglePattern(String pattern)(Code)
Set the pattern for angles fields. If some ordinates are formatted as angle (for example in ), then those angles will be formatted using this pattern.
Parameters:
  pattern - The angle pattern as specified in AngleFormat.



setCoordinateReferenceSystem
public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)(Code)
Set the coordinate reference system for points to be formatted. The number of dimensions must matched the dimension of points to be formatted.
Parameters:
  crs - The new coordinate system.



setDatePattern
public void setDatePattern(String pattern)(Code)
Set the pattern for dates fields. If some ordinates are formatted as date (for example in ), then those dates will be formatted using this pattern.
Parameters:
  pattern - The date pattern as specified in SimpleDateFormat.



setNumberPattern
public void setNumberPattern(String pattern)(Code)
Set the pattern for numbers fields. If some ordinates are formatted as plain number (for example in ), then those numbers will be formatted using this pattern.
Parameters:
  pattern - The number pattern as specified in DecimalFormat.



setSeparator
public void setSeparator(String separator)(Code)
Set the separator between each coordinate.
since:
   2.2



setTimeZone
public void setTimeZone(TimeZone timezone)(Code)
Set the time zone for dates fields. If some ordinates are formatted as date (for example in ), then those dates will be formatted using the specified time zone.
Parameters:
  timezone - The time zone for dates.



Methods inherited from java.text.Format
public Object clone()(Code)(Java Doc)
final public String format(Object obj)(Code)(Java Doc)
abstract public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)(Code)(Java Doc)
public AttributedCharacterIterator formatToCharacterIterator(Object obj)(Code)(Java Doc)
abstract public Object parseObject(String source, ParsePosition pos)(Code)(Java Doc)
public Object parseObject(String source) throws ParseException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.