Interface ImageView.ImageBindMapping

  • Enclosing class:
    ImageView

    public static interface ImageView.ImageBindMapping
    Translates between image and context data during data binding.
    • Method Detail

      • toImage

        Image toImage​(java.lang.Object value)
        Converts a value from the bind context to an image representation during a Component.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 a Component.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 a Component.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 a Component.store(Object) operation.

        Note: if the bind type is ImageView.ImageBindMapping.Type.URL or ImageView.ImageBindMapping.Type.NAME then 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.