com.tensegrity.composite
Interface CompositeViewRuler

All Superinterfaces:
Attributable, AttributableOnSet, CompositeViewMeasurementObject

public interface CompositeViewRuler
extends CompositeViewMeasurementObject

A ruler can be used for measurements within a CompositeView. It can display the units of different metrics.

Version:
$Id: CompositeViewRuler.java,v 1.13 2004/10/20 10:03:12 BurkhardWick Exp $
Author:
AndreasEbbert
See Also:
CoordinateSystemMetric

Field Summary
static java.lang.String CATEGORY_VIEW_RULER_DESC
          Constant holding the name of the ruler AttributeSet.
 
Fields inherited from interface com.tensegrity.composite.CompositeViewMeasurementObject
METRIC_UNIT_DESC, VISIBLE_DESC
 
Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet
TREE_SUBSET_POSTFIX
 
Method Summary
 double[] getOrigin()
          Returns the origin coordinate of this ruler.
 int getSize()
          Returns the size of the ruler in pixels.
 void setOrigin(double x, double y)
          Sets the origin of the ruler to the given coordinates under consideration of the set CoordinateSystemMetric.
 
Methods inherited from interface com.tensegrity.composite.CompositeViewMeasurementObject
getMetric, getUnit, isVisible, setMetric, setUnit, setVisible
 
Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree
 
Methods inherited from interface com.tensegrity.generic.attribute.Attributable
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue
 

Field Detail

CATEGORY_VIEW_RULER_DESC

public static final java.lang.String CATEGORY_VIEW_RULER_DESC
Constant holding the name of the ruler AttributeSet.

See Also:
Constant Field Values
Method Detail

setOrigin

public void setOrigin(double x,
                      double y)
Sets the origin of the ruler to the given coordinates under consideration of the set CoordinateSystemMetric.

Parameters:
x - the x-coordinate.
y - the y-coordinate.

getOrigin

public double[] getOrigin()
Returns the origin coordinate of this ruler. As usual, the x-coordinate is stored at index 0, the y-one at index 1.

Returns:
the origin coordinate of this ruler.

getSize

public int getSize()
Returns the size of the ruler in pixels. In fact this is the width of the ruler.

Returns:
the size of the ruler in pixels.


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