|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.octo.captcha.component.image.wordtoimage.AbstractWordToImage
public abstract class AbstractWordToImage
Implementation skeleton for the WordToImage component Basically this class implements the imageFromWord method proceding as folow :
Constructor Summary | |
---|---|
AbstractWordToImage()
|
Method Summary | |
---|---|
java.awt.image.BufferedImage |
getImage(java.lang.String word)
Creates an image of the provided String This method is a skeleton for creation algorithm. it proceeds as folows : Checks the word length Creates an java.text.AttributedString from the word Apply font to the AttributedString using the abstract method getFont Create an image for the background using the abstact method getBackround Put the text on the backround using the abstact method pasteText Return the newly created image |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.octo.captcha.component.image.wordtoimage.WordToImage |
---|
getImageHeight, getImageWidth, getMaxAcceptedWordLenght, getMaxAcceptedWordLength, getMinAcceptedWordLenght, getMinAcceptedWordLength, getMinFontSize |
Constructor Detail |
---|
public AbstractWordToImage()
Method Detail |
---|
public java.awt.image.BufferedImage getImage(java.lang.String word) throws CaptchaException
getImage
in interface WordToImage
CaptchaException
- if word is invalid or if image generation fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |