Package com.metsci.glimpse.core.context
Interface GlimpseTargetStack
-
- All Known Implementing Classes:
GlimpseTargetStackImpl,UnmodifiableTargetStack
public interface GlimpseTargetStackA class representing a nested sequence of GlimpseTarget containers and their bounds. The current TargetStack is provided to GlimpsePainters via the current GlimpseContext. The current TargetStack is used by LayoutCache as a key to store the GlimpseBounds for a given GlimpseTarget for each unique TargetStack which it has been rendered to.- Author:
- ulman
- See Also:
GlimpseLayoutCache,GlimpseContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GlimpseBoundsgetBounds()List<GlimpseBounds>getBoundsList()intgetSize()GlimpseTargetgetTarget()List<GlimpseTarget>getTargetList()GlimpseTargetStackpop()Removes the top GlimpseTarget / GlimpseBounds pair from the target stack.GlimpseTargetStackpush(GlimpseTarget target)Pushes a GlimpseTarget onto this TargetStack (with dummy GlimpseBounds).GlimpseTargetStackpush(GlimpseTarget target, GlimpseBounds bounds)Adds a new GlimpseTarget and its corresponding GlimpseBounds to the TargetStack.GlimpseTargetStackpush(GlimpseTargetStack stack)Pushes an existing stack onto the top of this stack, merging the two.
-
-
-
Method Detail
-
push
GlimpseTargetStack push(GlimpseTarget target, GlimpseBounds bounds)
Adds a new GlimpseTarget and its corresponding GlimpseBounds to the TargetStack.- Parameters:
target-bounds-- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
push
GlimpseTargetStack push(GlimpseTarget target)
Pushes a GlimpseTarget onto this TargetStack (with dummy GlimpseBounds).- Parameters:
target-- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
push
GlimpseTargetStack push(GlimpseTargetStack stack)
Pushes an existing stack onto the top of this stack, merging the two.- Parameters:
stack-- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
pop
GlimpseTargetStack pop()
Removes the top GlimpseTarget / GlimpseBounds pair from the target stack.
-
getTarget
GlimpseTarget getTarget()
- Returns:
- The GlimpseTarget at the top of the target stack (the highest index)
-
getBounds
GlimpseBounds getBounds()
- Returns:
- The GlimpsetBounds associated with the GlimpseTarget at the top of the target stack
-
getTargetList
List<GlimpseTarget> getTargetList()
-
getBoundsList
List<GlimpseBounds> getBoundsList()
-
getSize
int getSize()
-
-