All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.util.transforms
Class ColorToStringTransform

    com.sas.util.transforms.ColorToStringTransform

All Implemented Interfaces:
  com.sas.util.transforms.TransformInputOutputInterface, com.sas.util.transforms.TransformInterface, java.io.Serializable

    public class ColorToStringTransform

implements com.sas.util.transforms.TransformInputOutputInterface

ColorToStringTransform converts a java.awt.Color object to a String.

Examples:

         String str = ColorToStringTransform.defaultInstance.transform( java.awt.Color.red );
         String str = ColorToStringTransform.defaultInstance.transform( java.awt.SystemColor.control );
         String str = ColorToStringTransform.defaultInstance.transform( new java.awt.Color(255,0,0) );

See Also:
  Serialized Form

Field Summary
`protected static com.sas.models.ColorNameList` | `cnl`
`static ColorToStringTransform` | `defaultInstance`

Constructor Summary
`ColorToStringTransform()`

Method Summary
`java.lang.Class` | `getInputClass()`
`java.lang.Class` | `getOutputClass()`
`java.lang.String` | `transform(java.awt.Color input, boolean searchSystemColors)` Transform a Color to a String
`java.lang.Object` | `transform(java.lang.Object input)` Transform a `Color` to a `String`

Field Detail

### defaultInstance

    public static final ColorToStringTransform defaultInstance

### cnl

    protected static com.sas.models.ColorNameList cnl

Constructor Detail

### ColorToStringTransform

    public ColorToStringTransform()

Method Detail

### transform

    public java.lang.Object transform(java.lang.Object input)

  Transform a `Color` to a `String`

  Specified by:
    `transform` in interface `com.sas.util.transforms.TransformInterface`
  Parameters:
    `input` - color to transform by searching through all colors as default

### transform

    public java.lang.String transform(java.awt.Color input,
                                      boolean searchSystemColors)

  Transform a Color to a String

  Parameters:
    `input` - color to transform
    `searchSystemColors` - whether to search through SystemColors for a match along with regular colors

### getInputClass

    public java.lang.Class getInputClass()

  Specified by:
    `getInputClass` in interface `com.sas.util.transforms.TransformInputOutputInterface`

### getOutputClass

    public java.lang.Class getOutputClass()

  Specified by:
    `getOutputClass` in interface `com.sas.util.transforms.TransformInputOutputInterface`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.