com.tensegrity.composite
Interface CompositeNavigator

All Superinterfaces:
InteractionProvider

public interface CompositeNavigator
extends InteractionProvider

A CompositeNavigator is responsible for displaying a graphical overview of the content of a CompositeNavigatorProvider. The CompositeNavigator must also support user interaction, such as zooming into or out of certain ares of the displayed content.

The appearance of the CompositeNavigator can be configured through the methods listed below:

Notice that the appearance configuration of a CompositeNavigator is still under construction. It is planned that this appearance will be configurable with a Style object introduced with the BaseComposite interface.

To display the content of the CompositeNavigatorProvider, a CompositeNavigator should use the capabilities of the Renderer and Device components available in the graphics framework. For more information about how these components work, please see the documentation for interfaces Renderer and Device. The method which utilizes these components is:

Please view interface CompositeNavigatorProvider for more information about the data component for this interface.

Version:
$Id: CompositeNavigator.java,v 1.21 2005/10/25 13:14:01 KevinCVS Exp $
Author:
MichaelKegel

Nested Class Summary
static interface CompositeNavigator.ColorListener
           A listener that gets notified of changes in the colors of this navigator.
static interface CompositeNavigator.ZoomValueListener
          Interface for the listeners interested in the current used zoom value of this Navigator.
 
Method Summary
 void addColorListener(CompositeNavigator.ColorListener listener)
          Adds a new color listener to this navigator
 void addZoomValueListener(CompositeNavigator.ZoomValueListener listener)
          The method addZoomValueListener adds an instance of ZoomValueListener to a internal list of listeners.
 void draw(Renderer renderer, Device device, Transform2D xform_context)
          Draws the content provided by the current CompositeNavigatorProvider with the specified Renderer onto the specified Device.
 Boundary getBoundingBox()
          Returns the bounding box of the CompositeNavigator.
 CompositeNavigatorProvider getProvider()
          Returns the CompositeNavigatorProvider the CompositeNavigator currently displays the content of.
 Transform2D getViewTransform(Transform2D xform_context)
          Returns the Transform2D of the navigator's view.
 void removeColorListener(CompositeNavigator.ColorListener listener)
          Removes a new color listener to this navigator
 void removeZoomValueListener(CompositeNavigator.ZoomValueListener listener)
          The method removeZoomValueListener should remove the given listener from a list of listeners.
 void setBoundingBox(int left, int right, int top, int bottom)
          Sets the bounding box for the CompositeNavigator to the values given by left, right, top and bottom.
 void setPaint(PaintFormat paint)
          Sets the PaintFormat that is used to fill the background of the CompositeNavigator.
 void setProvider(CompositeNavigatorProvider provider)
          Sets the CompositeNavigatorProvider given by provider as the new content provider for the CompositeNavigator.
 void setViewportRectPaint(PaintFormat paint)
          Sets the PaintFormat that is used to fill the rectangle that indicates the visible area of the CompositeNavogatorProvider.
 void setViewportRectStroke(StrokeFormat stroke)
          Sets the StrokeFormat that is used to draw a border around the rectangle that indicates the visible area of the CompositeNavogatorProvider.
 
Methods inherited from interface com.tensegrity.graphics.interaction.InteractionProvider
actAt, descriptorChanged, dismissFromInteractionCycle, getCurrentInteractionItemFor, getCursorID, getInteractionProviders, getSelection, getSelectionBoundingBox, hasMultiSelection, hasSelection, hasSubSelection, hitsAt, mouseClickAt, mouseDownAt, mouseMoveAt, mouseUpAt, postAction, preAction, select, selectAll, selectAt, selectContaining, selectSubsequent, setSelection, startActionAt, stopActionAt, unselect, unselect, unselectAll, unselectSubsequent
 

Method Detail

setPaint

public void setPaint(PaintFormat paint)
Sets the PaintFormat that is used to fill the background of the CompositeNavigator.

Parameters:
paint - The PaintFormat the background is filled with.

Find more information in the class documentation


setViewportRectStroke

public void setViewportRectStroke(StrokeFormat stroke)
Sets the StrokeFormat that is used to draw a border around the rectangle that indicates the visible area of the CompositeNavogatorProvider.

Parameters:
stroke - the StrokeFormat viewport rectangles border is drawn with

Find more information in the class documentation


setViewportRectPaint

public void setViewportRectPaint(PaintFormat paint)
Sets the PaintFormat that is used to fill the rectangle that indicates the visible area of the CompositeNavogatorProvider.

Parameters:
paint - The PaintFormat the viewport rectangle is filled with.

Find more information in the class documentation


getBoundingBox

public Boundary getBoundingBox()
Returns the bounding box of the CompositeNavigator.

Returns:
Boundary the bounding box of the CompositeNavigator

setBoundingBox

public void setBoundingBox(int left,
                           int right,
                           int top,
                           int bottom)
Sets the bounding box for the CompositeNavigator to the values given by left, right, top and bottom.

Parameters:
left - the new value for the left side of the bounding box
right - the new value for the right side of the bounding box
top - the new value for the top side of the bounding box
bottom - the new value for the bottom side of the bounding box

getProvider

public CompositeNavigatorProvider getProvider()
Returns the CompositeNavigatorProvider the CompositeNavigator currently displays the content of.

Returns:
CompositeNavigatorProvider the current CompositeNavigatorProvider.

setProvider

public void setProvider(CompositeNavigatorProvider provider)
Sets the CompositeNavigatorProvider given by provider as the new content provider for the CompositeNavigator.

Parameters:
provider - the new CompositeNavigatorProvider

getViewTransform

public Transform2D getViewTransform(Transform2D xform_context)
Returns the Transform2D of the navigator's view.

Parameters:
xform_context - the Transform2D to combine to the view transform of the navigator.
Returns:
the Transform2D of the navigator's view.

draw

public void draw(Renderer renderer,
                 Device device,
                 Transform2D xform_context)
Draws the content provided by the current CompositeNavigatorProvider with the specified Renderer onto the specified Device.

Parameters:
renderer - the Renderer used for drawing
device - the Device used for drawing
xform_context - the context transformation

Find more information in the class documentation


addZoomValueListener

public void addZoomValueListener(CompositeNavigator.ZoomValueListener listener)
The method addZoomValueListener adds an instance of ZoomValueListener to a internal list of listeners.

Parameters:
listener - a Listener to add.

removeZoomValueListener

public void removeZoomValueListener(CompositeNavigator.ZoomValueListener listener)
The method removeZoomValueListener should remove the given listener from a list of listeners.

Parameters:
listener - the listener to remove.

addColorListener

public void addColorListener(CompositeNavigator.ColorListener listener)
Adds a new color listener to this navigator

Parameters:
listener - The listener to add

removeColorListener

public void removeColorListener(CompositeNavigator.ColorListener listener)
Removes a new color listener to this navigator

Parameters:
listener - The listener to remove


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.