|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lessvoid.nifty.tools.ColorValidator
public class ColorValidator
This checks a given String that represents a color for being valid. Supported are both short mode "#f12f" and long mode "#ff1122ff"
Constructor Summary | |
---|---|
ColorValidator()
|
Method Summary | |
---|---|
boolean |
isLongMode(String toCheck)
Check if the color text is written in the long form with alpha. |
boolean |
isLongModeWithoutAlpha(String toCheck)
Check if the color text is written in the long form without alpha. |
boolean |
isShortMode(String toCheck)
Check if the color text is written in the short form with alpha. |
boolean |
isShortModeWithoutAlpha(String toCheck)
Check if the color text is written in the short form without alpha. |
boolean |
isValid(String toCheck)
Check if a string fits any type of color definition string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorValidator()
Method Detail |
---|
public boolean isValid(String toCheck)
toCheck
- the text to check
true
in case the text is a color definitionpublic boolean isShortMode(String toCheck)
#rgba
toCheck
- the text to check
true
in case the text is a short form color definition
with alphapublic boolean isShortModeWithoutAlpha(String toCheck)
#rgb
toCheck
- the text to check
true
in case the text is a short form color definition
without alphapublic boolean isLongMode(String toCheck)
#rrggbbaa
toCheck
- the text to check
true
in case the text is a long form color definition
with alphapublic boolean isLongModeWithoutAlpha(String toCheck)
#rrggbb
toCheck
- the text to check
true
in case the text is a long form color definition
without alpha
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |