Package uk.ac.starlink.ttools.plot2.task
Class PlotCaching
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.task.PlotCaching
-
public class PlotCaching extends java.lang.ObjectEncapsulates 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlotCachingcreateFullyCached()Returns an instance in which as much as possible is cached between plot frames.static PlotCachingcreateUncached()Returns an instance in which nothing is cached between plot frames.booleangetCacheImage()Returns images caching policy.booleangetReuseRanges()Returns the aux range caching policy.booleangetUsePlans()Returns the plan caching policy.voidsetCacheImage(boolean cacheImage)Sets image caching policy.voidsetReuseRanges(boolean reuseRanges)Sets aux range caching policy.voidsetUsePlans(boolean usePlans)Sets plan caching policy.
-
-
-
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
-
setUsePlans
public void setUsePlans(boolean usePlans)
Sets plan caching policy. If true, plan objects will be retained following a plot and used as input to the next plotting attempt; if false, no plans will be cached.- Parameters:
usePlans- drawing plan caching policy- See Also:
Drawing.calculatePlan(java.lang.Object[], uk.ac.starlink.ttools.plot2.data.DataStore)
-
getUsePlans
public boolean getUsePlans()
Returns the plan caching policy. If true, plan objects will be retained following a plot and used as input to the next plotting attempt; if false, no plans will be cached.- Returns:
- drawing plan caching policy
- See Also:
Drawing.calculatePlan(java.lang.Object[], uk.ac.starlink.ttools.plot2.data.DataStore)
-
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
-
-