Class GlimpseLayoutCache<D>


  • public class GlimpseLayoutCache<D>
    extends Object
    Stores the bounds of a GlimpseLayout keyed off of the sequence of nested parent GlimpseLayouts leading back to the GlimpseCanvas. If a given GlimpseLayout is rendered to the same sequence of parent GlimpseLayouts and none of the parent GlimpseLayouts have changed shape, then the layout algorithm does not need to be run, the cached LayoutBounds can be used.
    Author:
    ulman
    • Constructor Detail

      • GlimpseLayoutCache

        public GlimpseLayoutCache()
    • Method Detail

      • size

        public int size()
      • getValues

        public List<D> getValues()
      • getValueNoBoundsCheck

        public D getValueNoBoundsCheck​(GlimpseContext context)
      • clear

        public void clear()
        Removes all mappings from the cache, the component associated with this cache will have to be laid out again for each of its RenderTargets.
      • getMatching

        public Collection<D> getMatching​(TargetStackMatcher matcher)
        Returns:
        all keys in the cache which match the provided predicate