Java Doc for Format.java in  » Ajax » gwtext-2.01 » com » gwtext » client » util » 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 » Ajax » gwtext 2.01 » com.gwtext.client.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.gwtext.client.util.Format

Format
public class Format (Code)
Reusable data formatting functions.




Method Summary
native public static  Stringdate(String value)
     Parse a value into a formatted date using the specified format pattern.
native public static  Stringdate(String value, String format)
     Parse a value into a formatted date using the specified format pattern.
native public static  Stringellipsis(String value, int length)
     Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length.
native public static  StringfileSize(long size)
     Simple format for a file size (xxx bytes, xxx KB, xxx MB).
public static  Stringformat(String format, int value)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
public static  Stringformat(String format, String[] values)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
public static  Stringformat(String format, int value1, int value2)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
public static  Stringformat(String format, int value1, int value2, int value3)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2, String value3)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2, String value3, String value4)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2, String value3, String value4, String value5)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2, String value3, String value4, String value5, String value6)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  Stringformat(String format, String value1, String value2, String value3, String value4, String value5, String value6, String value7)
     Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.
native public static  StringhtmlDecode(String value)
     Convert certain characters (&, <, >, and ') from their HTML character equivalents.
native public static  StringhtmlEncode(String value)
     Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
native public static  StringleftPad(String string, int size)
     Pads the left side of a string with a specified character.
native public static  StringleftPad(String string, int size, String character)
     Pads the left side of a string with a specified character.
native public static  StringstripScripts(String text)
     Strips all script tags.
native public static  StringstripTags(String value)
     Strips all HTML tags.
native public static  StringusMoney(String value)
     Format a number as US currency.
native public static  StringusMoney(double value)
     Format a number as US currency.



Method Detail
date
native public static String date(String value)(Code)
Parse a value into a formatted date using the specified format pattern. Format defaults to 'm/d/Y'.
Parameters:
  value - the date string the formatted date string



date
native public static String date(String value, String format)(Code)
Parse a value into a formatted date using the specified format pattern.
Parameters:
  value - the value to format
Parameters:
  format - Any valid date format string (defaults to 'm/d/Y') the formatted date string



ellipsis
native public static String ellipsis(String value, int length)(Code)
Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length.
Parameters:
  value - the string to truncate
Parameters:
  length - the maximum length to allow before truncating the converted text



fileSize
native public static String fileSize(long size)(Code)
Simple format for a file size (xxx bytes, xxx KB, xxx MB).
Parameters:
  size - the numeric value to format the formatted file size



format
public static String format(String format, int value)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value - the value to replace token {0} the formatted string



format
native public static String format(String format, String value)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value - the value to replace token {0} the formatted string



format
public static String format(String format, String[] values)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  values - the value to replace token {0}, {1}, ... the formatted string



format
public static String format(String format, int value1, int value2)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1} the formatted string



format
native public static String format(String format, String value1, String value2)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1} the formatted string



format
public static String format(String format, int value1, int value2, int value3)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2} the formatted string



format
native public static String format(String format, String value1, String value2, String value3)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2} the formatted string



format
native public static String format(String format, String value1, String value2, String value3, String value4)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2}
Parameters:
  value4 - the value to replace token {3} the formatted string



format
native public static String format(String format, String value1, String value2, String value3, String value4, String value5)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2}
Parameters:
  value4 - the value to replace token {3}
Parameters:
  value5 - the value to replace token {4} the formatted string



format
native public static String format(String format, String value1, String value2, String value3, String value4, String value5, String value6)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2}
Parameters:
  value4 - the value to replace token {3}
Parameters:
  value5 - the value to replace token {4}
Parameters:
  value6 - the value to replace token {5} the formatted string



format
native public static String format(String format, String value1, String value2, String value3, String value4, String value5, String value6, String value7)(Code)
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.
Parameters:
  format - the tokenized string to be formatted
Parameters:
  value1 - the value to replace token {0}
Parameters:
  value2 - the value to replace token {1}
Parameters:
  value3 - the value to replace token {2}
Parameters:
  value4 - the value to replace token {3}
Parameters:
  value5 - the value to replace token {4}
Parameters:
  value6 - the value to replace token {5}
Parameters:
  value7 - the value to replace token {6} the formatted string



htmlDecode
native public static String htmlDecode(String value)(Code)
Convert certain characters (&, <, >, and ') from their HTML character equivalents.
Parameters:
  value - the string to decode the decoded text



htmlEncode
native public static String htmlEncode(String value)(Code)
Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
Parameters:
  value - the string to encode the encoded text



leftPad
native public static String leftPad(String string, int size)(Code)
Pads the left side of a string with a specified character. This is especially useful for normalizing number and date strings.

 String val = Format.leftPad("123", 5, "0");
 //val now containts the String "00123"
 

Parameters:
  string - the original string
Parameters:
  size - the total length of the output string the padded string



leftPad
native public static String leftPad(String string, int size, String character)(Code)
Pads the left side of a string with a specified character. This is especially useful for normalizing number and date strings.

 String val = Format.leftPad("123", 5, "0");
 //val now containts the String "00123"
 

Parameters:
  string - the original string
Parameters:
  size - the total length of the output string
Parameters:
  character - he character with which to pad the original string (defaults to empty string " ") the padded string



stripScripts
native public static String stripScripts(String text)(Code)
Strips all script tags.
Parameters:
  text - the text from which to strip script tags the stripped text



stripTags
native public static String stripTags(String value)(Code)
Strips all HTML tags.
Parameters:
  value - the text from which to strip tags the stripped text



usMoney
native public static String usMoney(String value)(Code)
Format a number as US currency.
Parameters:
  value - the value value to format the formatted currency string



usMoney
native public static String usMoney(double value)(Code)
Format a number as US currency.
Parameters:
  value - the numeric value to format the formatted currency string



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.