com.metsci.glimpse.context
Interface GlimpseTarget

All Known Subinterfaces:
GlimpseCanvas
All Known Implementing Classes:
ColorAxisPlot2D, FrameBufferGlimpseCanvas, GlimpseAxisLayout1D, GlimpseAxisLayout2D, GlimpseAxisLayoutX, GlimpseAxisLayoutY, GlimpseLayout, MapPlot2D, MinimapLayout, MultiAxisPlot2D, OffscreenGlimpseCanvas, Plot2D, SimplePlot2D, StackedPlot2D, StackedTimePlot2D, SwingGlimpseCanvas, SwtBridgeGlimpseCanvas, SwtGlimpseCanvas

public interface GlimpseTarget

GlimpseTarget represents a location to which GlimpsePainters may be drawn. GlimpseTargets may either be heavy weight instances of GlimpseCanvas or light weight 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 GlimpseBoudns of a GlimpseTarget, a GlimpseLayoutStack must be provided. The GlimpseLayoutStack specifies the parent hierarchy to provide a size for.

Author:
ulman

Method Summary
 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.
 GlimpseBounds getTargetBounds(GlimpseTargetStack stack)
          Returns the cached or calculated bounds of this GlimpseTarget for a particular context.
 java.util.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)
           
 

Method Detail

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 (see isEventConsumer()).

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 -

removeLayout

void removeLayout(GlimpseLayout layout)
Removes a previously added layout from this GlimpseTarget.

Parameters:
layout -

getTargetChildren

java.util.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)


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