Class CaptchaConfig.Builder
java.lang.Object
cloud.opencode.base.captcha.CaptchaConfig.Builder
- Enclosing class:
CaptchaConfig
Configuration Builder
配置构建器
- Since:
- JDK 25, opencode-base-captcha V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbackgroundColor(Color backgroundColor) Sets the background color.build()Builds the configuration.caseSensitive(boolean caseSensitive) Sets case sensitivity.expireTime(Duration expireTime) Sets the expiration time.fontColors(Color... fontColors) Sets the font colors.Sets the font name.fontSize(float fontSize) Sets the font size.gifDelay(int gifDelay) Sets the GIF frame delay.gifFrameCount(int gifFrameCount) Sets the GIF frame count.height(int height) Sets the image height.length(int length) Sets the CAPTCHA code length.noiseDots(int noiseDots) Sets the number of noise dots.noiseLines(int noiseLines) Sets the number of noise lines.type(CaptchaType type) Sets the CAPTCHA type.width(int width) Sets the image width.
-
Method Details
-
width
Sets the image width. 设置图像宽度。- Parameters:
width- the width | 宽度- Returns:
- this builder | 此构建器
-
height
Sets the image height. 设置图像高度。- Parameters:
height- the height | 高度- Returns:
- this builder | 此构建器
-
length
Sets the CAPTCHA code length. 设置验证码长度。- Parameters:
length- the length | 长度- Returns:
- this builder | 此构建器
-
type
Sets the CAPTCHA type. 设置验证码类型。- Parameters:
type- the type | 类型- Returns:
- this builder | 此构建器
-
expireTime
Sets the expiration time. 设置过期时间。- Parameters:
expireTime- the expire time | 过期时间- Returns:
- this builder | 此构建器
-
noiseLines
Sets the number of noise lines. 设置干扰线数量。- Parameters:
noiseLines- the noise lines count | 干扰线数量- Returns:
- this builder | 此构建器
-
noiseDots
Sets the number of noise dots. 设置干扰点数量。- Parameters:
noiseDots- the noise dots count | 干扰点数量- Returns:
- this builder | 此构建器
-
fontSize
Sets the font size. 设置字体大小。- Parameters:
fontSize- the font size | 字体大小- Returns:
- this builder | 此构建器
-
fontName
Sets the font name. 设置字体名称。- Parameters:
fontName- the font name | 字体名称- Returns:
- this builder | 此构建器
-
backgroundColor
Sets the background color. 设置背景颜色。- Parameters:
backgroundColor- the background color | 背景颜色- Returns:
- this builder | 此构建器
-
fontColors
Sets the font colors. 设置字体颜色。- Parameters:
fontColors- the font colors | 字体颜色数组- Returns:
- this builder | 此构建器
-
caseSensitive
Sets case sensitivity. 设置区分大小写。- Parameters:
caseSensitive- true for case sensitive | true 表示区分大小写- Returns:
- this builder | 此构建器
-
gifFrameCount
Sets the GIF frame count. 设置 GIF 帧数。- Parameters:
gifFrameCount- the frame count | 帧数- Returns:
- this builder | 此构建器
-
gifDelay
Sets the GIF frame delay. 设置 GIF 帧延迟。- Parameters:
gifDelay- the delay in milliseconds | 延迟(毫秒)- Returns:
- this builder | 此构建器
-
build
-