Java Doc for JWicTools.java in  » Web-Framework » jWic » de » jwic » renderer » 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 » Web Framework » jWic » de.jwic.renderer.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.jwic.renderer.util.JWicTools

JWicTools
public class JWicTools (Code)
JWicTools are used as a velocity context object to provide usefull functions like formatting within velocity templates. The JWicTools are placed as the context object "jwic".
author:
   Florian Lippisch
version:
   $Revision: 1.7 $


Field Summary
protected  Localelocale
    

Constructor Summary
public  JWicTools(Locale locale)
     JWicTools.

Method Summary
public  Stringformat(String pattern, Object object)
     Returns a String MessageFormat(ed) with the pattern and the object in current Locale.
public  StringformatDate(Date date)
     Returns the time in short format.
public  StringformatDateTime(Date date)
     Returns the time in short format.
public  StringformatHtml(String text)
     Transforms text into HTML format.
public  StringformatInp(String text)
     Transforms HTML code into code that can be placed into a TEXTAREA field.
public  StringformatTime(Date time)
     Returns the time in short format.
public  StringgenerateCssProperty(IHTMLElement element)
     Generates the class and style property based upon the IHTMLElement object.
public  StringgenerateCssProperty(IHTMLElement element, String extraStyles)
     Generates the class and style property based upon the IHTMLElement object.
public  StringgetContextPath()
     Returns the context path of the webapp.
public  LocalegetLocale()
    
public static  StringlinkResource(Object control, String resourceName)
     Creates a URL to the specified resource.
public  voidsetLocale(Locale locale)
    
public  StringtoUtf8(String text)
     Transforms a text into UTF-8 format.

Field Detail
locale
protected Locale locale(Code)




Constructor Detail
JWicTools
public JWicTools(Locale locale)(Code)
JWicTools.




Method Detail
format
public String format(String pattern, Object object)(Code)
Returns a String MessageFormat(ed) with the pattern and the object in current Locale.
Parameters:
  pattern -
Parameters:
  object - An Object or an array of objects



formatDate
public String formatDate(Date date)(Code)
Returns the time in short format. If time is 0:0:0.0 an empty String is returned.
Parameters:
  time -



formatDateTime
public String formatDateTime(Date date)(Code)
Returns the time in short format. If time is 0:0:0.0 an empty String is returned.
Parameters:
  time -



formatHtml
public String formatHtml(String text)(Code)
Transforms text into HTML format. Used to transform user inputed text.

Returns an empty string if the argument is null. java.lang.String
Parameters:
  text - java.lang.String




formatInp
public String formatInp(String text)(Code)
Transforms HTML code into code that can be placed into a TEXTAREA field. i.e. transforming < character into &lt;

Returns an empty string if the argument is null. java.lang.String
Parameters:
  text - java.lang.String




formatTime
public String formatTime(Date time)(Code)
Returns the time in short format. If time is 0:0:0.0 an empty String is returned.
Parameters:
  time -



generateCssProperty
public String generateCssProperty(IHTMLElement element)(Code)
Generates the class and style property based upon the IHTMLElement object.
Parameters:
  element -



generateCssProperty
public String generateCssProperty(IHTMLElement element, String extraStyles)(Code)
Generates the class and style property based upon the IHTMLElement object. The extraStyles parameter is added to the style property.

Sample Result: class="myClass" style="width: 98px;"
Parameters:
  element -



getContextPath
public String getContextPath()(Code)
Returns the context path of the webapp. Used to build links with an absolut path.



getLocale
public Locale getLocale()(Code)
Returns the locale.



linkResource
public static String linkResource(Object control, String resourceName)(Code)
Creates a URL to the specified resource. Works only if the ClasspathResourceServlet is activated.
Parameters:
  control -
Parameters:
  resourceName -



setLocale
public void setLocale(Locale locale)(Code)

Parameters:
  locale - The locale to set.



toUtf8
public String toUtf8(String text)(Code)
Transforms a text into UTF-8 format. Required by renderers who create XML files in UTF-8 format.
Parameters:
  text -



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.