DesignElementHandle parentHandle = handle; do { parentHandle = parentHandle.getContainer( ); } while( this.handle != parentHandle && !parentHandle.getDefn( ).hasStyle( ) );   setupReportElement( design, handle );  StyleDesign style = createDistinctStyle( handle, parentHandle); if (style != null) { design.setStyle(style); }
setupStyledElement( design, handle, STYLE_FLAG_ALL );
	protected void setupStyledElement( StyledElementDesign design, ReportElementHandle handle )	{		DesignElementHandle parentHandle = handle;		do		{			parentHandle = parentHandle.getContainer( );		}		while( this.handle != parentHandle && !parentHandle.getDefn( ).hasStyle( ) );				// Styled element is a report element		setupReportElement( design, handle );		StyleDesign style = createDistinctStyle( handle, parentHandle);		if (style != null)		{			design.setStyle(style);		}	}