|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Captcha
The generic captcha component.
Field Summary |
---|
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Method Summary | |
---|---|
void |
addFont(java.awt.Font font)
Add fonts into fonts list. |
java.lang.String |
getBgColor()
Get the background color of the captcha box (in string as #RRGGBB). null means default. |
int |
getBgRGB()
Get the background color in int array (0: red, 1: green, 2:blue). null means default. |
CaptchaEngine |
getCaptchaEngine()
Get the captcha engine. |
java.awt.Font[] |
getDefaultFonts()
Gets the default font list. |
java.lang.String |
getExclude()
Get exclude characters. |
java.awt.Font |
getFont(int j)
Get nth Font. |
java.lang.String |
getFontColor()
Gets font color. |
int |
getFontRGB()
Get the font color in int array (0: red, 1: green, 2:blue). |
java.util.List |
getFonts()
Gets fonts list, default provide two fonts. |
int |
getIntHeight()
Get the captcha int height in pixel; to be used by the derived subclass. |
int |
getIntWidth()
Get the captcha int width in pixel; to be used by the derived subclass. |
int |
getLength()
Get length of the autogenerated text value; default to 5. |
java.lang.String |
getValue()
Get the text value of this captcha. |
boolean |
isNoise()
Whether generate noise; default to true. |
java.lang.String |
randomValue()
Regenerates new captcha text value and redraw. |
void |
setBgColor(java.lang.String color)
Set the background color of the chart. |
void |
setEngine(CaptchaEngine engine)
Set the captcha engine. |
void |
setEngine(java.lang.String clsnm)
Sets the captcha engine by use of a class name. |
void |
setExclude(java.lang.String exclude)
Set exclude characters that will not be generated. |
void |
setFontColor(java.lang.String color)
Set font color. |
void |
setLength(int len)
Set length of the autogenerated text value; default to 5. |
void |
setNoise(boolean b)
Wheather generate noise; default to true. |
void |
setValue(java.lang.String text)
Set the text value to be shown as the distortion captcha. |
Methods inherited from interface org.zkoss.zul.api.Image |
---|
getAlign, getBorder, getContent, getHover, getHspace, getSrc, getVspace, setAlign, setBorder, setContent, setContent, setHover, setHoverContent, setHoverContent, setHspace, setSrc, setVspace |
Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Method Detail |
---|
java.util.List getFonts()
java.awt.Font[] getDefaultFonts()
java.awt.Font getFont(int j)
void addFont(java.awt.Font font)
void setFontColor(java.lang.String color)
java.lang.String getFontColor()
int getFontRGB()
void setBgColor(java.lang.String color)
color
- in #RRGGBB format (hexdecimal).java.lang.String getBgColor()
int getBgRGB()
int getIntWidth()
int getIntHeight()
java.lang.String getValue()
void setValue(java.lang.String text) throws WrongValueException
text
- the captcha text value
WrongValueException
void setLength(int len)
int getLength()
void setExclude(java.lang.String exclude)
java.lang.String getExclude()
void setNoise(boolean b)
boolean isNoise()
java.lang.String randomValue()
void setEngine(java.lang.String clsnm) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
void setEngine(CaptchaEngine engine)
CaptchaEngine getCaptchaEngine() throws UiException
UiException
- if failed to load the engine.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |