Interface MultiLevelSource

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      RenderedImage getImage​(int level)
      Gets the scaled image for the given resolution level.
      Shape getImageShape​(int level)
      Gets the shape of the area where this image's raster data contains valid pixels at the given resolution level.
      MultiLevelModel getModel()
      Gets the layout model for the multi-resolution image supported by this LevelImageSource.
      void reset()
      Provides a hint that the level images provided so far will no longer be accessed from a reference in user space.
    • Method Detail

      • getModel

        MultiLevelModel getModel()
        Gets the layout model for the multi-resolution image supported by this LevelImageSource.
        Returns:
        the multi-resolution image model.
      • getImage

        RenderedImage getImage​(int level)
        Gets the scaled image for the given resolution level. The width and height of an image returned for a given level is scale times smaller than the dimensions of the image at level=0.
        Parameters:
        level - The resolution level.
        Returns:
        The scaled image, must be in the range 0 to MultiLevelModel.getLevelCount()-1.
      • getImageShape

        Shape getImageShape​(int level)
        Gets the shape of the area where this image's raster data contains valid pixels at the given resolution level. The method returns null, if the entire image raster contains valid pixels.
        Parameters:
        level - The resolution level.
        Returns:
        The shape of the area where the image has data, can be null.
      • reset

        void reset()

        Provides a hint that the level images provided so far will no longer be accessed from a reference in user space.

        Therefore implementations of this method might also dispose any cached level images that have been provided so far.

        After calling this method, a call to getImage(int)} for the same level may return a new level image instance.

        This method is particularly useful if properties have changed that affect the appearance of the returned images at all levels, e.g. after a new color palette has been assigned or the contrast range has changed.