Class PlotCaching


  • public class PlotCaching
    extends java.lang.Object
    Encapsulates some choices about what caching is performed when preparing a plot.
    Since:
    16 Jan 2017
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      PlotCaching()
      Constructs an instance with no caching.
    • Constructor Detail

      • PlotCaching

        public PlotCaching()
        Constructs an instance with no caching.
    • Method Detail

      • setCacheImage

        public void setCacheImage​(boolean cacheImage)
        Sets image caching policy. If true, plot image will be cached where applicable, if false it will be regenerated from the data on every repaint.
        Parameters:
        cacheImage - image caching policy
      • getCacheImage

        public boolean getCacheImage()
        Returns images caching policy. If true, plot image will be cached where applicable, if false it will be regenerated from the data on every repaint.
        Returns:
        image caching policy
      • setReuseRanges

        public void setReuseRanges​(boolean reuseRanges)
        Sets aux range caching policy. If true, aux ranges will be calculated only once, if false they will be recalculated when the surface changes.
        Parameters:
        reuseRanges - aux range caching policy
      • getReuseRanges

        public boolean getReuseRanges()
        Returns the aux range caching policy. If true, aux ranges will be calculated only once, if false they will be recalculated when the surface changes.
        Returns:
        aux range caching policy
      • createFullyCached

        public static PlotCaching createFullyCached()
        Returns an instance in which as much as possible is cached between plot frames.
        Returns:
        aggressively caching instance
      • createUncached

        public static PlotCaching createUncached()
        Returns an instance in which nothing is cached between plot frames.
        Returns:
        non-caching instance