org.apache.commons.jelly.tags.swt.converters
Class ColorConverter

java.lang.Object
  extended byorg.apache.commons.jelly.tags.swt.converters.ColorConverter
All Implemented Interfaces:
org.apache.commons.beanutils.Converter

public class ColorConverter
extends java.lang.Object
implements org.apache.commons.beanutils.Converter

A Converter that converts Strings in the form "#uuuuuu" or "x,y,z" into a RGB object

Version:
$Revision: 155420 $
Author:
Christiaan ten Klooster

Constructor Summary
ColorConverter()
           
 
Method Summary
 java.lang.Object convert(java.lang.Class type, java.lang.Object value)
           
static ColorConverter getInstance()
           
 org.eclipse.swt.graphics.RGB parse(java.lang.String value)
          Parse a String
protected  org.eclipse.swt.graphics.RGB parseHtml(java.lang.String value)
          Parsers a String in the form "#xxxxxx" into an SWT RGB class
protected  int parseNumber(java.lang.String text)
           
protected  org.eclipse.swt.graphics.RGB parseRGB(java.lang.String value)
          Parsers a String in the form "x, y, z" into an SWT RGB class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorConverter

public ColorConverter()
Method Detail

getInstance

public static ColorConverter getInstance()

parseRGB

protected org.eclipse.swt.graphics.RGB parseRGB(java.lang.String value)
Parsers a String in the form "x, y, z" into an SWT RGB class

Parameters:
value -
Returns:
RGB

parseHtml

protected org.eclipse.swt.graphics.RGB parseHtml(java.lang.String value)
Parsers a String in the form "#xxxxxx" into an SWT RGB class

Parameters:
value -
Returns:
RGB

parse

public org.eclipse.swt.graphics.RGB parse(java.lang.String value)
Parse a String


convert

public java.lang.Object convert(java.lang.Class type,
                                java.lang.Object value)
Specified by:
convert in interface org.apache.commons.beanutils.Converter

parseNumber

protected int parseNumber(java.lang.String text)


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.