com.metsci.glimpse.layout
Class GlimpseLayoutCache<D>

java.lang.Object
  extended by com.metsci.glimpse.layout.GlimpseLayoutCache<D>

public class GlimpseLayoutCache<D>
extends java.lang.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 Summary
GlimpseLayoutCache()
           
 
Method Summary
 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.
static boolean compareBounds(java.util.List<GlimpseBounds> list1, java.util.List<GlimpseBounds> list2)
           
 D getValue(GlimpseContext context)
           
 D getValue(GlimpseTargetStack layoutStack)
           
 D getValueNoBoundsCheck(GlimpseContext context)
           
 D getValueNoBoundsCheck(GlimpseTargetStack layoutStack)
           
 void setValue(GlimpseContext context, D value)
           
 void setValue(GlimpseTargetStack stack, D value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlimpseLayoutCache

public GlimpseLayoutCache()
Method Detail

getValue

public D getValue(GlimpseContext context)

getValue

public D getValue(GlimpseTargetStack layoutStack)

getValueNoBoundsCheck

public D getValueNoBoundsCheck(GlimpseContext context)

getValueNoBoundsCheck

public D getValueNoBoundsCheck(GlimpseTargetStack layoutStack)

setValue

public void setValue(GlimpseTargetStack stack,
                     D value)

setValue

public void setValue(GlimpseContext context,
                     D value)

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.


compareBounds

public static boolean compareBounds(java.util.List<GlimpseBounds> list1,
                                    java.util.List<GlimpseBounds> list2)


Copyright © 2012 Metron, Inc.. All Rights Reserved.