Java Doc for Captcha.java in  » Ajax » zk » org » zkoss » zul » 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 » zk » org.zkoss.zul 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.zul.Image
   org.zkoss.zul.Captcha

Captcha
public class Captcha extends org.zkoss.zul.Image (Code)
The generic captcha component.
author:
   henrichen



Constructor Summary
public  Captcha()
    

Method Summary
public  voidaddFont(Font font)
     Add fonts into fonts list.
static  intdecode(String color)
    
public  StringgetBgColor()
     Get the background color of the captcha box (in string as #RRGGBB).
public  intgetBgRGB()
     Get the background color in int array (0: red, 1: green, 2:blue).
public  CaptchaEnginegetCaptchaEngine()
     Get the captcha engine.
public  Font[]getDefaultFonts()
     Gets the default font list.
public  StringgetExclude()
     Get exclude characters.
public  FontgetFont(int j)
     Get nth Font.
public  StringgetFontColor()
     Gets font color.
public  intgetFontRGB()
     Get the font color in int array (0: red, 1: green, 2:blue).
public  ListgetFonts()
     Gets fonts list, default provide two fonts.
public  intgetIntHeight()
     Get the captcha int height in pixel; to be used by the derived subclass.
public  intgetIntWidth()
     Get the captcha int width in pixel; to be used by the derived subclass.
public  intgetLength()
     Get length of the autogenerated text value; default to 5.
public  StringgetValue()
     Get the text value of this captcha.
public  booleanisNoise()
     Whether generate noise; default to true.
protected  CaptchaEnginenewCaptchaEngine()
     Instantiates the default captcha engine. It is called, if Captcha.setEngine is not called with non-null engine.

By default, it looks up the component attribute called captcha-engine.

public  StringrandomValue()
     Regenerates new captcha text value and redraw.
public  voidsetBgColor(String color)
     Set the background color of the chart.
public  voidsetEngine(String clsnm)
     Sets the captcha engine by use of a class name.
public  voidsetEngine(CaptchaEngine engine)
     Set the captcha engine.
public  voidsetExclude(String exclude)
     Set exclude characters that will not be generated.
public  voidsetFontColor(String color)
     Set font color.
public  voidsetHeight(String h)
     Override super class to prepare the int height.
public  voidsetLength(int len)
     Set length of the autogenerated text value; default to 5.
public  voidsetNoise(boolean b)
     Wheather generate noise; default to true.
public  voidsetValue(String text)
     Set the text value to be shown as the distortion captcha.
public  voidsetWidth(String w)
     Override super class to prepare the int width.
protected  voidsmartDrawCaptcha()
     mark a draw flag to inform that this Chart needs update.


Constructor Detail
Captcha
public Captcha()(Code)




Method Detail
addFont
public void addFont(Font font)(Code)
Add fonts into fonts list. If you did not add fonts, the default implementation would use the default fonts; i.e. bold Arial 35, and bold courier 35.



decode
static int decode(String color)(Code)



getBgColor
public String getBgColor()(Code)
Get the background color of the captcha box (in string as #RRGGBB). null means default.



getBgRGB
public int getBgRGB()(Code)
Get the background color in int array (0: red, 1: green, 2:blue). null means default.



getCaptchaEngine
public CaptchaEngine getCaptchaEngine() throws UiException(Code)
Get the captcha engine.
exception:
  UiException - if failed to load the engine.



getDefaultFonts
public Font[] getDefaultFonts()(Code)
Gets the default font list.



getExclude
public String getExclude()(Code)
Get exclude characters.



getFont
public Font getFont(int j)(Code)
Get nth Font.



getFontColor
public String getFontColor()(Code)
Gets font color.



getFontRGB
public int getFontRGB()(Code)
Get the font color in int array (0: red, 1: green, 2:blue).



getFonts
public List getFonts()(Code)
Gets fonts list, default provide two fonts.



getIntHeight
public int getIntHeight()(Code)
Get the captcha int height in pixel; to be used by the derived subclass.



getIntWidth
public int getIntWidth()(Code)
Get the captcha int width in pixel; to be used by the derived subclass.



getLength
public int getLength()(Code)
Get length of the autogenerated text value; default to 5.



getValue
public String getValue()(Code)
Get the text value of this captcha.



isNoise
public boolean isNoise()(Code)
Whether generate noise; default to true.



newCaptchaEngine
protected CaptchaEngine newCaptchaEngine() throws UiException(Code)
Instantiates the default captcha engine. It is called, if Captcha.setEngine is not called with non-null engine.

By default, it looks up the component attribute called captcha-engine. If found, the value is assumed to be the class or the class name of the default engine (it must implement CaptchaEngine . If not found, UiException is thrown.

Derived class might override this method to provide your own default class.
exception:
  UiException - if failed to instantiate the engine
since:
   3.0.0




randomValue
public String randomValue()(Code)
Regenerates new captcha text value and redraw.



setBgColor
public void setBgColor(String color)(Code)
Set the background color of the chart.
Parameters:
  color - in #RRGGBB format (hexdecimal).



setEngine
public void setEngine(String clsnm) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, java.lang.reflect.InvocationTargetException(Code)
Sets the captcha engine by use of a class name. It creates an instance automatically.



setEngine
public void setEngine(CaptchaEngine engine)(Code)
Set the captcha engine.



setExclude
public void setExclude(String exclude)(Code)
Set exclude characters that will not be generated. Note that only digit and character is used in generating text value. If you leave exclude null, the default exclude list will be applied; i.e., 0123456789IilOo (only character (no digits) are used except I, i, l, O(big O), o(small o))



setFontColor
public void setFontColor(String color)(Code)
Set font color.



setHeight
public void setHeight(String h)(Code)
Override super class to prepare the int height.



setLength
public void setLength(int len)(Code)
Set length of the autogenerated text value; default to 5.



setNoise
public void setNoise(boolean b)(Code)
Wheather generate noise; default to true.



setValue
public void setValue(String text)(Code)
Set the text value to be shown as the distortion captcha.
Parameters:
  text - the captcha text value



setWidth
public void setWidth(String w)(Code)
Override super class to prepare the int width.



smartDrawCaptcha
protected void smartDrawCaptcha()(Code)
mark a draw flag to inform that this Chart needs update.



Methods inherited from org.zkoss.zul.Image
public String getAlign()(Code)(Java Doc)
public String getBorder()(Code)(Java Doc)
public org.zkoss.image.Image getContent()(Code)(Java Doc)
public String getHspace()(Code)(Java Doc)
public String getInnerAttrs()(Code)(Java Doc)
public String getOuterAttrs()(Code)(Java Doc)
public String getSrc()(Code)(Java Doc)
public String getVspace()(Code)(Java Doc)
public boolean isChildable()(Code)(Java Doc)
protected Object newExtraCtrl()(Code)(Java Doc)
public void setAlign(String align)(Code)(Java Doc)
public void setBorder(String border)(Code)(Java Doc)
public void setContent(org.zkoss.image.Image image)(Code)(Java Doc)
public void setHspace(String hspace)(Code)(Java Doc)
public void setSrc(String src)(Code)(Java Doc)
public void setVspace(String vspace)(Code)(Java Doc)
public void smartUpdate(String attr, String value)(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.