org.swixml.converters

Class RectangleConverter

Implemented Interfaces:
Converter

public final class RectangleConverter
extends java.lang.Object
implements Converter

A Converter that turns a Strings in the form: width,height into Rectangle objects.

Examples for Valid XML attribute notations:

 
 
Version:
$Revision: 1.1 $
Author:
Wolf Paulus
See Also:
java.awt.Rectangle, ConverterLibrary

Field Summary

static Class
TEMPLATE
converter's return type

Method Summary

Object
convert(Class type, Attribute attr, Localizer localizer)
Converts a String into a Rectangle object
Class
convertsTo()
A Converters conversTo method informs about the Class type the converter is returning when its convert method is called

Field Details

TEMPLATE

public static final Class TEMPLATE
converter's return type

Method Details

convert

public Object convert(Class type,
                      Attribute attr,
                      Localizer localizer)
Converts a String into a Rectangle object
Specified by:
convert in interface Converter
Parameters:
type - Class not used
attr - Attribute value fields needs provides convertable String
Returns:
Object - runtime type is Dimension

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

Copyright B) 2002 - 2005 - Wolf Paulus - CarlsbadCubes.com . All rights reserved.