Interface GlimpseTarget
-
- All Known Subinterfaces:
GlimpseCanvas
,NewtGlimpseCanvas
- All Known Implementing Classes:
AbstractGlimpseCanvas
,CollapsibleTimePlot2D
,ColorAxisPlot2D
,EmptyPlot2D
,FBOGlimpseCanvas
,GlimpseAxisLayout1D
,GlimpseAxisLayout2D
,GlimpseAxisLayout2DWithPopup
,GlimpseAxisLayoutX
,GlimpseAxisLayoutY
,GlimpseLayout
,GlimpseTouchLayout
,GlimpseTouchWrapper
,GlimpseVerticallyScrollableLayout
,MapPlot2D
,MinimapLayout
,MultiAxisPlot2D
,MultiAxisPlot2DWithPopup
,NewtSwingEDTGlimpseCanvas
,NewtSwingGlimpseCanvas
,Plot2D
,SimplePlot2D
,StackedPlot2D
,StackedTimePlot2D
,SwingGlimpseCanvas
,SwingLightweightGlimpseCanvas
,TaggedColorAxisPlot2D
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.
- Author:
- ulman
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.boolean
isVisible()
If true, the GlimpseTarget should be drawn on the screen and mouse events should be dispatched for it.void
removeAllLayouts()
Clears the canvas, removing all attached GlimpseLayouts.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)
-
-
-
Method Detail
-
isVisible
boolean isVisible()
If true, the GlimpseTarget should be drawn on the screen and mouse events should be dispatched for it. Otherwise it is invisible and mouse events should not fire for the GlimpseTarget or its children.
-
isEventConsumer
boolean isEventConsumer()
Sets whether this GlimpseTarget hides events from GlimpseTargets under it. This value does not determine whether or not the GlimpseTarget will generate GlimpseMouseEvents (see {@link #isEventGenerator()).- Returns:
- whether this target hides events from targets under it
-
setEventConsumer
void setEventConsumer(boolean consume)
Set whether or not this GlimpseTarget will consume or pass through mouse events.- Parameters:
consume
-
-
isEventGenerator
boolean isEventGenerator()
Sets whether this GlimpseTarget generates GlimpseMouseEvents. This value does not determine whether or not GlimpseTargets underneath this GlimpseTarget will also generate GlimpseMouseEvents (seeisEventConsumer()
).- Returns:
- whether this target will generate GlimpseMouseEvents
-
setEventGenerator
void setEventGenerator(boolean generate)
Set whether or not this GlimpseTarget will generate GlimpseMouseEvents.- Parameters:
generate
-
-
addLayout
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. This same GlimpseLayout may be a child of any number of different GlimpseTargets.- Parameters:
layout
-
-
addLayout
void addLayout(GlimpseLayout layout, int zOrder)
-
setZOrder
void setZOrder(GlimpseLayout layout, int zOrder)
-
removeLayout
void removeLayout(GlimpseLayout layout)
Removes a previously added layout from this GlimpseTarget.- Parameters:
layout
-
-
removeAllLayouts
void removeAllLayouts()
Clears the canvas, removing all attached GlimpseLayouts.
-
getTargetChildren
List<GlimpseTarget> getTargetChildren()
- Returns:
- the list of children added through addLayout( GlimpseLayout ).
-
getTargetBounds
GlimpseBounds getTargetBounds(GlimpseTargetStack stack)
Returns the cached or calculated bounds of this GlimpseTarget for a particular context.- Parameters:
stack
-- Returns:
- the bounds for the given stack
-
setLookAndFeel
void setLookAndFeel(LookAndFeel laf)
Sets the LookAndFeel for this GlimpseTarget and all child GlimpseTargets.
-
-