public interface GlimpseTarget
GlimpseTarget represents a location to which GlimpsePainters may be drawn. GlimpseTargets may either be heavyweight instances of GlimpseCanvas or lightweight instances of GlimpseLayout representing a subsection of a parent GlimpseLayout or GlimpseCanvas.
GlimpseTargets may be nested (child GlimpseTargets are retrieved via getTargetChildren()). A single GlimpseTarget may have multiple parents, thus no getParent() method is provided. Because of this, a GlimpseTarget does not have a single size. Instead, it maintains a size for every parent hierarchy which it is part of. Therefore, in order to get the GlimpseBounds of a GlimpseTarget, a GlimpseLayoutStack must be provided. The GlimpseLayoutStack specifies the parent hierarchy to provide a size for.
Modifier and Type | Method and Description |
---|---|
void |
addLayout(GlimpseLayout layout)
Adds a sub-layout to this GlimpseTarget which will only paint in a region of this GlimpseTarget
based on its layout constraints.
|
void |
addLayout(GlimpseLayout layout,
int zOrder) |
GlimpseBounds |
getTargetBounds(GlimpseTargetStack stack)
Returns the cached or calculated bounds of this GlimpseTarget for a particular context.
|
List<GlimpseTarget> |
getTargetChildren() |
boolean |
isEventConsumer()
Sets whether this GlimpseTarget hides events from GlimpseTargets under it.
|
boolean |
isEventGenerator()
Sets whether this GlimpseTarget generates GlimpseMouseEvents.
|
void |
removeLayout(GlimpseLayout layout)
Removes a previously added layout from this GlimpseTarget.
|
void |
setEventConsumer(boolean consume)
Set whether or not this GlimpseTarget will consume or pass through mouse events.
|
void |
setEventGenerator(boolean generate)
Set whether or not this GlimpseTarget will generate GlimpseMouseEvents.
|
void |
setLookAndFeel(LookAndFeel laf)
Sets the LookAndFeel for this GlimpseTarget and all child GlimpseTargets.
|
void |
setZOrder(GlimpseLayout layout,
int zOrder) |
boolean isEventConsumer()
void setEventConsumer(boolean consume)
consume
- boolean isEventGenerator()
isEventConsumer()
).void setEventGenerator(boolean generate)
generate
- void addLayout(GlimpseLayout layout)
layout
- void addLayout(GlimpseLayout layout, int zOrder)
void setZOrder(GlimpseLayout layout, int zOrder)
void removeLayout(GlimpseLayout layout)
layout
- List<GlimpseTarget> getTargetChildren()
GlimpseBounds getTargetBounds(GlimpseTargetStack stack)
stack
- void setLookAndFeel(LookAndFeel laf)
Copyright © 2013 Metron, Inc.. All rights reserved.