element.id = 0;
	public Object clone( ) throws CloneNotSupportedException	{		DesignElement element = (DesignElement) super.clone( );		element.container = null;		element.listeners = null;		element.derived = null;		element.extendsRef = null;		element.cachedDefn = null;		element.handle = null;		// System Properties		Iterator it = propValues.keySet( ).iterator( );		element.propValues = new HashMap( );		while ( it.hasNext( ) )		{			String key = (String) it.next( );			PropertyDefn propDefn = getPropertyDefn( key );			if ( propDefn.getTypeCode( ) == PropertyType.STRUCT_TYPE )			{				if ( propDefn.isList( ) )				{					element.propValues							.put( key, cloneStructList( (ArrayList) propValues									.get( key ) ) );				}				else				{					element.propValues.put( key, ( (Structure) propValues							.get( key ) ).copy( ) );				}			}			else if ( propDefn.getTypeCode( ) == PropertyType.ELEMENT_REF_TYPE )			{				// set cloned reference to be unresolved.				ElementRefValue refValue = (ElementRefValue) propValues						.get( key );				ElementRefValue newRefValue = new ElementRefValue( );				newRefValue.unresolved( refValue.getName( ) );				element.propValues.put( key, newRefValue );			}			else				element.propValues.put( key, propValues.get( key ) );		}		// User Properties		if ( userProperties != null )		{			element.userProperties = new HashMap( );			it = userProperties.keySet( ).iterator( );			while ( it.hasNext( ) )			{				Object key = it.next( );				UserPropertyDefn uDefn = (UserPropertyDefn) userProperties						.get( key );				element.userProperties.put( key, uDefn.copy( ) );			}		}		return element;	}