SWIXML
1.6 (#161)

org.swixml.converters
Class ImageConverter

java.lang.Object
  extended by org.swixml.converters.ImageConverter
All Implemented Interfaces:
Converter

public class ImageConverter
extends Object
implements Converter

A Converter that turns a Strings in the form of a filename into an Image objects.

Version:
$Revision: 1.1 $
Author:
Wolf Paulus
See Also:
Dimension, ConverterLibrary

Field Summary
static Class TEMPLATE
          converter's return type
 
Constructor Summary
ImageConverter()
           
 
Method Summary
static Object conv(Class type, Attribute attr, Localizer localizer)
          Converts a String into an ImageIcon through a Resource lookup
 Object convert(Class type, Attribute attr, Localizer localizer)
          Converts a String into an ImageIcon through a Resource lookup
 Class convertsTo()
          A Converters conversTo method informs about the Class type the converter is returning when its convert method is called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE

public static final Class TEMPLATE
converter's return type

Constructor Detail

ImageConverter

public ImageConverter()
Method Detail

convert

public Object convert(Class type,
                      Attribute attr,
                      Localizer localizer)
Converts a String into an ImageIcon through a Resource lookup

Specified by:
convert in interface Converter
Parameters:
type - Class not used
attr - Attribute attribute provides the value to be converted
localizer - Localizer allow the use of resource lookups
Returns:
Object - an ImageIcon

conv

public static Object conv(Class type,
                          Attribute attr,
                          Localizer localizer)
Converts a String into an ImageIcon through a Resource lookup

Parameters:
type - Class not used
attr - Attribute attribute provides the value to be converted
localizer - Localizer allow the use of resource lookups
Returns:
Object - an ImageIcon

convertsTo

public Class convertsTo()
A Converters conversTo method informs about the Class type the converter is returning when its convert method is called

Specified by:
convertsTo in interface Converter
Returns:
Class - the Class the converter is returning when its convert method is called

SWIXML
1.6 (#161)

Copyright � 2002 - 2011 - Wolf Paulus - wolfpaulus.com. All rights reserved.