com.vaadin.ui.declarative.converters
Class DesignShortcutActionConverter

java.lang.Object
  extended by com.vaadin.ui.declarative.converters.DesignShortcutActionConverter
All Implemented Interfaces:
Converter<java.lang.String,ShortcutAction>, java.io.Serializable

public class DesignShortcutActionConverter
extends java.lang.Object
implements Converter<java.lang.String,ShortcutAction>

Converter for ShortcutActions.

Since:
7.4
Author:
Vaadin Ltd
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.data.util.converter.Converter
Converter.ConversionException
 
Constructor Summary
DesignShortcutActionConverter()
           
 
Method Summary
 ShortcutAction convertToModel(java.lang.String value, java.lang.Class<? extends ShortcutAction> targetType, java.util.Locale locale)
          Converts the given value from target type to source type.
 java.lang.String convertToPresentation(ShortcutAction value, java.lang.Class<? extends java.lang.String> targetType, java.util.Locale locale)
          Converts the given value from source type to target type.
 int getKeycodeForString(java.lang.String attributePresentation)
           
 java.lang.Class<ShortcutAction> getModelType()
          The source type of the converter.
 java.lang.Class<java.lang.String> getPresentationType()
          The target type of the converter.
 java.lang.String getStringForKeycode(int keyCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesignShortcutActionConverter

public DesignShortcutActionConverter()
Method Detail

convertToModel

public ShortcutAction convertToModel(java.lang.String value,
                                     java.lang.Class<? extends ShortcutAction> targetType,
                                     java.util.Locale locale)
                              throws Converter.ConversionException
Description copied from interface: Converter
Converts the given value from target type to source type.

A converter can optionally use locale to do the conversion.

A converter should in most cases be symmetric so chaining Converter.convertToPresentation(Object, Class, Locale) and Converter.convertToModel(Object, Class, Locale) should return the original value.

Specified by:
convertToModel in interface Converter<java.lang.String,ShortcutAction>
Parameters:
value - The value to convert, compatible with the target type. Can be null
targetType - The requested type of the return value
locale - The locale to use for conversion. Can be null.
Returns:
The converted value compatible with the source type
Throws:
Converter.ConversionException - If the value could not be converted

convertToPresentation

public java.lang.String convertToPresentation(ShortcutAction value,
                                              java.lang.Class<? extends java.lang.String> targetType,
                                              java.util.Locale locale)
                                       throws Converter.ConversionException
Description copied from interface: Converter
Converts the given value from source type to target type.

A converter can optionally use locale to do the conversion.

A converter should in most cases be symmetric so chaining Converter.convertToPresentation(Object, Class, Locale) and Converter.convertToModel(Object, Class, Locale) should return the original value.

Specified by:
convertToPresentation in interface Converter<java.lang.String,ShortcutAction>
Parameters:
value - The value to convert, compatible with the target type. Can be null
targetType - The requested type of the return value
locale - The locale to use for conversion. Can be null.
Returns:
The converted value compatible with the source type
Throws:
Converter.ConversionException - If the value could not be converted

getModelType

public java.lang.Class<ShortcutAction> getModelType()
Description copied from interface: Converter
The source type of the converter. Values of this type can be passed to Converter.convertToPresentation(Object, Class, Locale).

Specified by:
getModelType in interface Converter<java.lang.String,ShortcutAction>
Returns:
The source type

getPresentationType

public java.lang.Class<java.lang.String> getPresentationType()
Description copied from interface: Converter
The target type of the converter. Values of this type can be passed to Converter.convertToModel(Object, Class, Locale).

Specified by:
getPresentationType in interface Converter<java.lang.String,ShortcutAction>
Returns:
The target type

getKeycodeForString

public int getKeycodeForString(java.lang.String attributePresentation)

getStringForKeycode

public java.lang.String getStringForKeycode(int keyCode)


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.