com.tensegrity.composite
Interface CompositeNavigatorProvider

All Superinterfaces:
Observable
All Known Subinterfaces:
CompositeView, VisualGraphView

public interface CompositeNavigatorProvider
extends Observable

The CompositeNavigatorProvider interface defines a role which provides a CompositeNavigator with all of the BaseComposite objects it should display.

The bridge between a CompositeNavigator and a CompositeNavigatorProvider is the Observable interface specified in the generics framework. By merging these interfaces, a CompositeNavigator can be informed about changes to a CompositeNavigatorProvider and subsequently update the displayed objects.

Version:
$Id: CompositeNavigatorProvider.java,v 1.24 2005/04/28 12:39:21 KevinCVS Exp $
Author:
MichaelKegel

Field Summary
static int VIEW_SCALE_X
          constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).
static int VIEW_SCALE_Y
          constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).
static int VIEW_TRANSLATION_X
          constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).
static int VIEW_TRANSLATION_Y
          constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).
static int VIEWPORT_SCALE_X
          constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).
static int VIEWPORT_SCALE_Y
          constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).
static int VIEWPORT_TRANSLATION_X
          constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).
static int VIEWPORT_TRANSLATION_Y
          constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).
 
Method Summary
 Boundary getCompositeBoundingBox()
          Returns the bounding box that encapsulates all the elements that are hold by the CompositeView.
 BaseCompositeIterator getCompositeIterator()
          Returns a BaseCompositeIterator that can be used to iterate over the CompositeNavigatorProviders list of BaseComposites.
 CoordinateSystem getCoordinateSystem()
          Returns the current CoordinateSystem of the CompositeNavigatorProvider.
 CoordinateSystem getReferenceCoordinateSystem()
          Method getReferenceCoordinateSystem returns the reference coordinate system.
 double getScaleX()
          Deprecated. use getViewValues instead
 double getScaleY()
          Deprecated. use getViewValues instead
 double[] getViewportCoordinates(double rangeX, double rangeY)
          Returns the coordinates of the viewport transformed to the ranges given by rangeX and rangeY.
 double[] getViewportValues()
          Returns the values of the viewport the CompositeNavigatorProvider uses.
 double[] getViewValues()
          Returns the values of the view the CompositeNavigatorProvider uses.
 boolean isActing()
          Returns true if this instance is currently acting.
 void setViewportAndViewValues(double[] valuesViewport, double[] valuesView)
          Sets the values of the view and viewport the CompositeNavigatorProvider uses.
 void setViewportValues(double[] valuesViewport)
          Sets the values of the viewport the CompositeNavigatorProvider uses.
 void setViewValues(double[] values)
          Sets the values of the view the CompositeNavigatorProvider uses.
 
Methods inherited from interface com.tensegrity.generic.util.Observable
addObserver, clearChanged, deleteObserver, deleteObservers, getObservers, notifyObservers, notifyObservers, setChanged
 

Field Detail

VIEWPORT_TRANSLATION_X

public static final int VIEWPORT_TRANSLATION_X
constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).

See Also:
Constant Field Values

VIEWPORT_TRANSLATION_Y

public static final int VIEWPORT_TRANSLATION_Y
constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).

See Also:
Constant Field Values

VIEWPORT_SCALE_X

public static final int VIEWPORT_SCALE_X
constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).

See Also:
Constant Field Values

VIEWPORT_SCALE_Y

public static final int VIEWPORT_SCALE_Y
constant that tells about an index within a viewport values array returned by getViewportValues() and used by setViewportValues(double[]).

See Also:
Constant Field Values

VIEW_TRANSLATION_X

public static final int VIEW_TRANSLATION_X
constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).

See Also:
Constant Field Values

VIEW_TRANSLATION_Y

public static final int VIEW_TRANSLATION_Y
constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).

See Also:
Constant Field Values

VIEW_SCALE_X

public static final int VIEW_SCALE_X
constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).

See Also:
Constant Field Values

VIEW_SCALE_Y

public static final int VIEW_SCALE_Y
constant that tells about an index within a view values array returned by getViewValues() and used by setViewValues(double[]).

See Also:
Constant Field Values
Method Detail

getScaleX

public double getScaleX()
Deprecated. use getViewValues instead

Returns the current scale value in x direction of the CompositeNavigatorProvider.

Returns:
double the scale value in x direction

getScaleY

public double getScaleY()
Deprecated. use getViewValues instead

Returns the current scale value in y direction of the CompositeNavigatorProvider.

Returns:
double the scale value in y direction

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
Returns the current CoordinateSystem of the CompositeNavigatorProvider.

Returns:
CoordinateSystem the current CoordinateSystem

getViewportValues

public double[] getViewportValues()
Returns the values of the viewport the CompositeNavigatorProvider uses. The values of the viewport are listed below:
The indices of the values are defined by the constants listed below.

Returns:
double[] the array with the values of the viewport
See Also:
VIEWPORT_TRANSLATION_X, VIEWPORT_TRANSLATION_Y, VIEWPORT_SCALE_X, VIEWPORT_SCALE_Y

setViewportValues

public void setViewportValues(double[] valuesViewport)
Sets the values of the viewport the CompositeNavigatorProvider uses. The values of the viewport are listed below:
The indices of the values are defined by the constants listed below.

Parameters:
valuesViewport - the array with the new values for the viewport
See Also:
VIEWPORT_TRANSLATION_X, VIEWPORT_TRANSLATION_Y, VIEWPORT_SCALE_X, VIEWPORT_SCALE_Y

getViewValues

public double[] getViewValues()
Returns the values of the view the CompositeNavigatorProvider uses. The values of the view are listed below:
The indices of the values are defined by the constants listed below.

Returns:
double[] the array with the values of the view
See Also:
VIEW_TRANSLATION_X, VIEW_TRANSLATION_Y, VIEW_SCALE_X, VIEW_SCALE_Y

setViewValues

public void setViewValues(double[] values)
Sets the values of the view the CompositeNavigatorProvider uses. The values of the view are listed below:
The indices of the values are defined by the constants listed below.

Parameters:
values - the array with the new values for the view
See Also:
VIEW_TRANSLATION_X, VIEW_TRANSLATION_Y, VIEW_SCALE_X, VIEW_SCALE_Y

setViewportAndViewValues

public void setViewportAndViewValues(double[] valuesViewport,
                                     double[] valuesView)
Sets the values of the view and viewport the CompositeNavigatorProvider uses.

Parameters:
valuesViewport - the array with the new values for the viewport.
valuesView - the array with the new values for the view.
See Also:
setViewportValues(double[]), setViewValues(double[])

getViewportCoordinates

public double[] getViewportCoordinates(double rangeX,
                                       double rangeY)
Returns the coordinates of the viewport transformed to the ranges given by rangeX and rangeY.

Parameters:
rangeX - the range in x direction
rangeY - the range in y direction
Returns:
double[] the transformed coordinates of the viewport

getCompositeIterator

public BaseCompositeIterator getCompositeIterator()
Returns a BaseCompositeIterator that can be used to iterate over the CompositeNavigatorProviders list of BaseComposites.

Returns:
BaseCompositeIterator to walk through the CompositeNavigatorProviders list of BaseComposites

getCompositeBoundingBox

public Boundary getCompositeBoundingBox()
Returns the bounding box that encapsulates all the elements that are hold by the CompositeView. Notice that this bounding box is given in the inner CoordinateSystem of the CompositeView.

Returns:
Boundary the bounding box that encapsulates all the elements inside the CompositeView

getReferenceCoordinateSystem

public CoordinateSystem getReferenceCoordinateSystem()
Method getReferenceCoordinateSystem returns the reference coordinate system.

Returns:
CoordinateSystem the current reference CoordinateSystem.

isActing

public boolean isActing()
Returns true if this instance is currently acting.

Returns:
true if this instance is currently acting.


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