com.tensegrity.composite.geometry
Class DefaultGeometryDescriptor

java.lang.Object
  extended bycom.tensegrity.composite.geometry.DefaultGeometryDescriptor
All Implemented Interfaces:
GeometryDescriptor

public class DefaultGeometryDescriptor
extends java.lang.Object
implements GeometryDescriptor

Default implementation of interface GeometryDescriptor. Look at this interface to get documentation.

Version:
$Id: DefaultGeometryDescriptor.java,v 1.18 2005/01/21 10:59:25 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
 
Fields inherited from interface com.tensegrity.composite.geometry.GeometryDescriptor
COMPOSITE_DESCRIPTOR, COMPOSITEGROUP_DESCRIPTOR, COMPOSITELABEL_DESCRIPTOR, COMPOSITELINE_DESCRIPTOR, COMPOSITESWIMLANE_DESCRIPTOR, COMPOSITETABLE_COLUMN_DESCRIPTOR, COMPOSITETABLE_DESCRIPTOR, COMPOSITETABLE_ROW_DESCRIPTOR, COMPOSITEVIEW_DESCRIPTOR, DESCRIPTOR_TYPE_MAX
 
Constructor Summary
DefaultGeometryDescriptor(int type, java.lang.String name, CoordinateSystem coordSystem, java.util.List items)
          Constructor for DefaultGeometryDescriptor.
DefaultGeometryDescriptor(int type, java.lang.String name, CoordinateSystem coordSystem, java.util.List items, AttributeSet attributes)
          Constructor for DefaultGeometryDescriptor specifying an additional AttributeSet.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 AttributeSet getAttributes()
          Returns an AttributeSet that holds the various attributes of this GeometryDescriptor.
 CoordinateSystem getCoordinateSystem()
          Returns the CoordinateSystem of the geometry.
 GeometryDescriptorItem getItem(java.lang.String name)
          Returns the GeometryDescriptorItem with the name given by name.
 java.lang.String getName()
          Returns the name of the GeometryDescriptor.
 int getType()
          Returns the type of the GeometryDescriptor.
 java.util.Iterator iteratorItems()
          This method returns an iterator which steps over the GeometryItems provided by this GeometryDescriptor object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultGeometryDescriptor

public DefaultGeometryDescriptor(int type,
                                 java.lang.String name,
                                 CoordinateSystem coordSystem,
                                 java.util.List items)
Constructor for DefaultGeometryDescriptor.

Parameters:
type - the type of this GeometryDescriptor.
name - a name for this GeometryDescriptor.
coordSystem - the CoordinateSystem to use.
items - a List holding the items of this descriptor.

DefaultGeometryDescriptor

public DefaultGeometryDescriptor(int type,
                                 java.lang.String name,
                                 CoordinateSystem coordSystem,
                                 java.util.List items,
                                 AttributeSet attributes)
Constructor for DefaultGeometryDescriptor specifying an additional AttributeSet.

Parameters:
type - the type of this GeometryDescriptor.
name - a name for this GeometryDescriptor.
coordSystem - the CoordinateSystem to use.
items - a List holding the items of this descriptor.
attributes - an AttributeSet holding attributes for this descriptor.
Method Detail

getType

public int getType()
Description copied from interface: GeometryDescriptor
Returns the type of the GeometryDescriptor. The allowed types are defined through constants defined in this interface.

Specified by:
getType in interface GeometryDescriptor
Returns:
int the type of the GeometryDescriptor

getName

public java.lang.String getName()
Description copied from interface: GeometryDescriptor
Returns the name of the GeometryDescriptor.
NOTICE: Since the name of a GeometryDescriptor is used to store it in the GeometryPool the name must be unique.

Specified by:
getName in interface GeometryDescriptor
Returns:
String the name of the geometry descriptor

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
Description copied from interface: GeometryDescriptor
Returns the CoordinateSystem of the geometry.

Specified by:
getCoordinateSystem in interface GeometryDescriptor
Returns:
CoordinateSystem

getAttributes

public AttributeSet getAttributes()
Description copied from interface: GeometryDescriptor
Returns an AttributeSet that holds the various attributes of this GeometryDescriptor. If no attributes are assigned to the GeometryDescriptor the return value is null.

Specified by:
getAttributes in interface GeometryDescriptor
Returns:
an AttributeSet holding the various attributes of this GeometryDescriptor or null.

getItem

public GeometryDescriptorItem getItem(java.lang.String name)
Description copied from interface: GeometryDescriptor
Returns the GeometryDescriptorItem with the name given by name. If no GeometryDescriptorItem is available with the given name null is returned.

Specified by:
getItem in interface GeometryDescriptor
Parameters:
name - the name of the GeometryDescriptorItem to return
Returns:
GeometryDescriptorItem the GeometryDescriptorItem with the given name or null

iteratorItems

public java.util.Iterator iteratorItems()
Description copied from interface: GeometryDescriptor
This method returns an iterator which steps over the GeometryItems provided by this GeometryDescriptor object.

Specified by:
iteratorItems in interface GeometryDescriptor
Returns:
Iterator object for all stored items in this descriptor

toString

public java.lang.String toString()
See Also:
Object.toString()

equals

public boolean equals(java.lang.Object obj)


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