Class DefaultImageSessionContext

  • All Implemented Interfaces:
    ImageSessionContext

    public class DefaultImageSessionContext
    extends AbstractImageSessionContext
    Very simple implementation of the ImageSessionContext interface. It works for absolute URLs and local filenames only. Consider writing your own implementation of the ImageSessionContext if you need more sophisticated functionality.
    • Constructor Detail

      • DefaultImageSessionContext

        public DefaultImageSessionContext​(ImageContext context,
                                          File baseDir)
        Main constructor.
        Parameters:
        context - the parent image context
        baseDir - the base directory for resolving relative filenames
    • Method Detail

      • getParentContext

        public ImageContext getParentContext()
        Returns the session-independent context object which provides configuration information.
        Returns:
        the associated ImageContext instance
      • getBaseDir

        public File getBaseDir()
        Returns the base directory for resolving relative filenames.
        Returns:
        the base directory
      • getTargetResolution

        public float getTargetResolution()
        Returns the resolution (in dpi) of the target device used when painting images.
        Returns:
        the target resolution (in dpi)