Package org.apache.pivot.wtk
Interface ImageView.ImageBindMapping
- 
- Enclosing class:
 - ImageView
 
public static interface ImageView.ImageBindMappingTranslates between image and context data during data binding. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classImageView.ImageBindMapping.TypeDefines the supported load type mappings. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImageView.ImageBindMapping.TypegetType()ImagetoImage(java.lang.Object value)Converts a value from the bind context to an image representation during aComponent.load(Object)operation.java.lang.StringtoImageName(java.lang.Object value)Converts a value from the bind context to an image resource name during aComponent.load(Object)operation.java.net.URLtoImageURL(java.lang.Object value)Converts a value from the bind context to an image location during aComponent.load(Object)operation.java.lang.ObjectvalueOf(Image image)Converts an image to a value to be stored in the bind context during aComponent.store(Object)operation. 
 - 
 
- 
- 
Method Detail
- 
getType
ImageView.ImageBindMapping.Type getType()
- Returns:
 - The load type supported by this mapping.
 
 
- 
toImage
Image toImage(java.lang.Object value)
Converts a value from the bind context to an image representation during aComponent.load(Object)operation.- Parameters:
 value- The value returned from the bound object.- Returns:
 - The image converted from the bound value.
 
 
- 
toImageURL
java.net.URL toImageURL(java.lang.Object value)
Converts a value from the bind context to an image location during aComponent.load(Object)operation.- Parameters:
 value- The value returned from the bound object.- Returns:
 - The value converted to an image URL.
 
 
- 
toImageName
java.lang.String toImageName(java.lang.Object value)
Converts a value from the bind context to an image resource name during aComponent.load(Object)operation.- Parameters:
 value- The value returned from the bound object.- Returns:
 - The value converted to an image name.
 
 
- 
valueOf
java.lang.Object valueOf(Image image)
Converts an image to a value to be stored in the bind context during aComponent.store(Object)operation.Note: if the bind type is
ImageView.ImageBindMapping.Type.URLorImageView.ImageBindMapping.Type.NAMEthen this will likely entail also persisting the image itself somewhere else and returning the name/location of the stored image.- Parameters:
 image- The image currently stored in the image view.- Returns:
 - The image converted to a value suitable for persistence in the bound object.
 
 
 - 
 
 -