UIX 2.2.8

oracle.cabo.ui.validate
Class ColorValidater

java.lang.Object
  |
  +--oracle.cabo.ui.validate.BaseClientValidater
        |
        +--oracle.cabo.ui.validate.ColorValidater
All Implemented Interfaces:
ClientValidater, Formatter, ServerValidater

public class ColorValidater
extends BaseClientValidater
implements Formatter

Validater for validating colors.


Field Summary
static java.lang.String[] DEFAULT_COLOR_FORMAT_PATTERNS
           
 
Fields inherited from interface oracle.cabo.ui.validate.ServerValidater
NO_CONTENT_ERROR_OFFSET, UNKNOWN_ERROR_OFFSET
 
Constructor Summary
ColorValidater(java.lang.String[] patterns, boolean allowsTransparent)
          Creates a ColorValidater.
 
Method Summary
 java.lang.String formatObject(java.lang.Object color, LocaleContext localeContext)
          Formats the value into a String in a potentially Locale-specific manner.
 int getColumns(LocaleContext localeContext)
           
protected  java.lang.String getHTMLLibReference()
          Returns the name of the Javascript code that this validator requires.
protected  java.lang.String getHTMLValidation(RenderingContext context)
           
 java.lang.String getValidationFormat(RenderingContext context, UINode node)
           
 boolean isTransparentAllowed()
           
 java.lang.Object parseString(java.lang.String colorString, LocaleContext localeContext)
          Returns the value as a Color.
 void setTransparentAllowed(boolean mayTrans)
           
static ColorValidater sharedInstance()
           
 java.text.ParseException[] validate(RenderingContext context, java.lang.String value)
           
 void writeDependencies(RenderingContext context, UINode node)
          Opportunity for the CLientValidater to write any of its dependencies to the output.
 
Methods inherited from class oracle.cabo.ui.validate.BaseClientValidater
getLookAndFeelString, getValidation, getWMLValidation, logError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLOR_FORMAT_PATTERNS

public static final java.lang.String[] DEFAULT_COLOR_FORMAT_PATTERNS
Constructor Detail

ColorValidater

public ColorValidater(java.lang.String[] patterns,
                      boolean allowsTransparent)
Creates a ColorValidater.
Parameters:
patterns - The set of RGBColorFormat format patterns that are accepted by this validater. The first pattern is special - it is always used for formatting color values.
allowsTransparent - Indicates whether or not transparent colors are considered valid.
Method Detail

sharedInstance

public static ColorValidater sharedInstance()

validate

public java.text.ParseException[] validate(RenderingContext context,
                                           java.lang.String value)

parseString

public java.lang.Object parseString(java.lang.String colorString,
                                    LocaleContext localeContext)
                             throws java.text.ParseException
Returns the value as a Color.
Specified by:
parseString in interface Formatter

formatObject

public java.lang.String formatObject(java.lang.Object color,
                                     LocaleContext localeContext)
Description copied from interface: Formatter
Formats the value into a String in a potentially Locale-specific manner.
Specified by:
formatObject in interface Formatter

getValidationFormat

public java.lang.String getValidationFormat(RenderingContext context,
                                            UINode node)
Overrides:
getValidationFormat in class BaseClientValidater

getColumns

public int getColumns(LocaleContext localeContext)

writeDependencies

public void writeDependencies(RenderingContext context,
                              UINode node)
                       throws java.io.IOException
Description copied from class: BaseClientValidater
Opportunity for the CLientValidater to write any of its dependencies to the output. For HTML, this will typically be imports of JavaScript libraries.
Overrides:
writeDependencies in class BaseClientValidater

setTransparentAllowed

public void setTransparentAllowed(boolean mayTrans)

isTransparentAllowed

public boolean isTransparentAllowed()

getHTMLValidation

protected java.lang.String getHTMLValidation(RenderingContext context)
Overrides:
getHTMLValidation in class BaseClientValidater

getHTMLLibReference

protected java.lang.String getHTMLLibReference()
Returns the name of the Javascript code that this validator requires.
Overrides:
getHTMLLibReference in class BaseClientValidater

UIX 2.2.8