Interface ImageAnnotation

  • All Superinterfaces:
    Annotation, ShapeAnnotation

    public interface ImageAnnotation
    extends ShapeAnnotation
    This annotation positions an image on on the screen. In the current implementation, the image is always rectangular, so the method will always return a list with a single value: "Rectangle". In the future, this might be expanded to support clipping to a shape.

    Module: presentation-api

    To use this in your app, include the following dependency in your POM:


    Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
    • Method Detail

      • getImage

        Image getImage()
        Return the image currently assigned to this annotation
        the current image
      • setImage

        void setImage​(Image image)
        Set the image to be displayed as part of this annotation
        image - the image to be displayed
      • getImageURL

        URL getImageURL()
        Get the URL for the image to be displayed
        the - image url
      • setImage

        void setImage​(URL url)
        Set a URL to fetch the image from.
        url - the URL of the image to be displayed
      • setImageOpacity

        void setImageOpacity​(float opacity)
        Set the opacity of the image. Opacity is a float value between 0.0 and 1.0 where 1.0 is completely opaque and 0.0 is completely transparent.
        opacity - the opacity of the image
      • getImageOpacity

        float getImageOpacity()
        Return the current opacity of the image.
        the image opacity
      • setImageBrightness

        void setImageBrightness​(int brightness)
        Set the brightness adjustment for the image. Brightness is a percentage value from -100 to 100.
        brightness - the brightness adjustment for the image
      • getImageBrightness

        int getImageBrightness()
        Return the brightness adjustment for this image.
        the brightness adjustment
      • setImageContrast

        void setImageContrast​(int contrast)
        Set the contrast adjustment for the image. Contrast is a non-linear adjustment with values from -100 to 100.
        contrast - the contrast adjustment for the image
      • getImageContrast

        int getImageContrast()
        Return the contrast adjustment for this image
        contrast adjustment