it.amattioli.guidate.converters
Class Converters

Show UML class diagram
java.lang.Object
  extended by it.amattioli.guidate.converters.Converters

public class Converters
extends Object


Method Summary
static org.zkoss.zkplus.databind.TypeConverter createFor(Class<?> propertyClass)
           
static org.zkoss.zkplus.databind.TypeConverter createFrom(Object converter)
          Creates a TypeConverter from an Object.
static org.zkoss.zkplus.databind.TypeConverter getFromComponent(org.zkoss.zk.ui.Component comp)
           
static void register(InputStream is)
          Register all the converters contained in an XML configuration file.
static void register(String resourceName)
           
static void register(String name, Class<?> convertedClass, Class<? extends org.zkoss.zkplus.databind.TypeConverter> converterClass)
           
static void setToComponent(org.zkoss.zk.ui.Component comp, org.zkoss.zkplus.databind.TypeConverter converter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public static void register(String name,
                            Class<?> convertedClass,
                            Class<? extends org.zkoss.zkplus.databind.TypeConverter> converterClass)

register

public static void register(InputStream is)
Register all the converters contained in an XML configuration file.

The provided file should contain a <converter> element for each converter that you want to register. The element attributes must be:

These attributes are the same as the parameters of the register(String, Class, Class) method.

Parameters:
is - the input stream from which the XML must be read

register

public static void register(String resourceName)

createFrom

public static org.zkoss.zkplus.databind.TypeConverter createFrom(Object converter)
Creates a TypeConverter from an Object.

If the object is already a TypeConverter, the object itself is returned.

If the object is a string it can be:

If the object is null or an empty string a AutoConverter is returned.

Parameters:
converter -
Returns:

createFor

public static org.zkoss.zkplus.databind.TypeConverter createFor(Class<?> propertyClass)

setToComponent

public static void setToComponent(org.zkoss.zk.ui.Component comp,
                                  org.zkoss.zkplus.databind.TypeConverter converter)

getFromComponent

public static org.zkoss.zkplus.databind.TypeConverter getFromComponent(org.zkoss.zk.ui.Component comp)


Copyright © 2011. All Rights Reserved.