Class ImageView

    • Constructor Detail

      • ImageView

        public ImageView()
        Creates an empty image view.
      • ImageView

        public ImageView​(Image image)
        Creates an image view with the given image.
        Parameters:
        image - The initial image to set, or null for no image.
    • Method Detail

      • getImage

        public final Image getImage()
        Returns the image view's current image.
        Returns:
        The current image, or null if no image is set.
      • setImage

        public final void setImage​(Image image)
        Sets the image view's current image.
        Parameters:
        image - The image to set, or null for no image.
      • setImage

        public final void setImage​(java.net.URL imageURL)
        Sets the image view's current image by URL.

        If the icon already exists in the application context resource cache, the cached value will be used. Otherwise, the icon will be loaded synchronously and added to the cache.

        Parameters:
        imageURL - The location of the image to set.
      • isAsynchronous

        public boolean isAsynchronous()
        Returns the image view's asynchronous flag.
        Returns:
        true if images specified via URL will be loaded in the background; false if they will be loaded synchronously.
      • setAsynchronous

        public void setAsynchronous​(boolean asynchronous)
        Sets the image view's asynchronous flag.
        Parameters:
        asynchronous - true if images specified via URL will be loaded in the background; false if they will be loaded synchronously.
      • getImageKey

        public java.lang.String getImageKey()
        Returns the image view's image key.
        Returns:
        The image key, or null if no key is set.
      • setImageKey

        public void setImageKey​(java.lang.String imageKey)
        Sets the image view's image key.
        Parameters:
        imageKey - The image key, or null to clear the binding.
      • getImageBindType

        public BindType getImageBindType()
      • setImageBindType

        public void setImageBindType​(BindType imageBindType)
      • load

        public void load​(java.lang.Object context)
        Description copied from class: Component
        Copies bound values from the bind context to the component. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        load in class Component
        Parameters:
        context - The object to load the bound values from.
      • store

        public void store​(java.lang.Object context)
        Description copied from class: Component
        Copies bound values from the component to the bind context. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        store in class Component
        Parameters:
        context - The object to store the bound values into.
      • clear

        public void clear()
        Description copied from class: Component
        Clears any bound values in the component. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        clear in class Component
      • clearImage

        public void clearImage()
        Force a reset of the image (and its listeners).