function LyricRowView() 
{
    /**
     * get the swara row view associated this lyric row view 
     * 
     * @type SwaraRowView 
     */
    this.getSwaraRow = function() { return this.fSwaraRow; }

    /**
     * make the passed-in lyric row as the swara row view associated with this lyric row view
     * @param {SwaraRowView} swaraRow
     */
    this.setSwaraRow = function( swaraRow ) {
	this.fSwaraRow = swaraRow;
    }

    /**
     * render the lyric row view - either progressively (i.e create DOM
     * objects now), or non-progressively (no DOM, just generate HTML content)
     * <p>
     * This renders (or generates HTML content for) the row view such that
     * it goes inside a NotationLine that is a row at index "idx" in the outer
     * table. If a NotationLine that corresponds to the swara row (or one of 
     * its lyric rows) for this lyric row already exists at idx, then this 
     * lyric row is added to that existing NotationLine. Else a new 
     * NotationLine is created
     *
     * @param	{boolean} asHTML	true => non-progressive rendering,
     *					false => progressive rendering
     * @param	{DOM}	  table		The table in which the notation-line
     *					to which this view belongs to
     * @param   {boolean} compactLayout	compact layout or span to page width?
     * @param	{int}	  idx		index of the notation line in the
     *					table
     * @return the DOM table row that represents the rendering (in this case 
     * the NotationLine) for progressive rendering, and NOTHING MEANINGFUL
     * for non-progressive rendering, since in this case the HTML content of 
     * the lyric row view is added to the notation line HTML content and 
     * maintained there until a later call to renderDOMCells which for the 
     * first SwaraLyricRowView under the NotationLine which will combine all
     * the notation line HTML content and return it
     */
    this.render = function(asHTML, table, compactLayout, idx) {
	var notationLine = null;

	if( asHTML ) {
	    /*
	     * for non-progressive rendering, always reuse swara-row's notation
	     * line. It is presumed that non-progressive rendering has no 
	     * pagination (cant paginate since it requires info which is known 
	     * only upong rendering)
	     */
	    return this.renderSwaraLyricRow(asHTML, this.fSwaraRow.getNotationLine(), 
	    				    this.fSwaraRow.getTala(), 
					    this.fSwaraRow.getIndexInLayoutCycle(),
					    table, compactLayout, idx);
	}

	// figure out idx
	if( !idx ) {
	    idx = 0;
	    if( table.rows )
		idx = table.rows.length;
	}
	// see if there is an approp existing NotationLine - such a row will
	// have its "view" prop pointing to our swara-row, or will have
	// its view point to a lyric row of our swara-row
	if(idx >= 0 && table.rows && idx < table.rows.length ) {
	    var tr = table.rows[idx];
	    var view = Utils.getObjForId(tr);
	    if( view && view.partType &&
		 ((view.partType() == PAGEVIEWPART_SWARAROW  // a swara row
				&& view == this.fSwaraRow) ||  // OUR swara row!
		    (view.partType() == PAGEVIEWPART_LYRICROW && 	// a lyric row
			view.getSwaraRow() == this.fSwaraRow )) ) // whose swara row
								   // is OUR swara row!
	    {
		notationLine = this.fSwaraRow.getNotationLine()
	    }
	}
	// render as a new notation line (notationLine == null) or to existing one
	return this.renderSwaraLyricRow(asHTML, notationLine, this.fSwaraRow.getTala(), 
					this.fSwaraRow.getIndexInLayoutCycle(),
					table, compactLayout, idx);
    }

    /**
     * move the HTML contents of the row from one HTML table to another
     * <p>
     * This is an override of TableRowPageViewPart.moveHTMLContents
     *
     * @param {DOM_TABLE}	the new table to which the contents need
     *				to be moved
     * @param {idx}		the index (of the NotationLine) in that table
     */
    this.moveHTMLContents = function(toTable, idx) {
	return this.moveSwaraLyricRowHTMLContents(this.fSwaraRow.getTala(), 
				this.fSwaraRow.getIndexInLayoutCycle(), toTable, idx);
    }

    /**
     * swara-row associated with this lyric row
     * @type SwaraRowView
     * @private
     */
    this.fSwaraRow = null;
}
/*
 * @class
 * represents the view content of a single row (line) of lyrics
 * <p>
 * <b>Rendering</b>: There are 2 kinds of rendering 
 * <ul>
 * <li> the progressive rendering used in WYSIWYG mode where rendering creates 
 * the actual DOM elements for the heading - done by {@link LyricRowView#render}
 * when the 'asHTML' parameter to it is false.
 * <li> non-progressive rendering used in start-up where render simply generates
 * the HTML content in a string. This is done by {@link LyricRowView#render} when
 * the 'asHTML' parameter to it is true.
 * </ul>
 * Both case, depend on {@link SwaraLyricRowView@renderSwaraLyricRow} to do
 * the real work. The only thing done in render is to decide if the lyric row
 * is rendered inside the same notation line as its swara row or is it in its
 * own. The latter will happen only if page break happens between the two.
 * This is not considered during non-progressive rendering since no pagination
 * is done during non-progressive (it is done afterwards when rendering of
 * entire song is done - see {@SongView#renderContents})
 *<p>
 * In non-progressive rendering, the HTML content of the <tr> generated by 
 * render, but is actually maintained inside the NotationLine object in an
 * "hold area" (so that it can gather content for subsequent lyric rows 
 * that belong to it also). The view itself establishes a reference to an 
 * array in the hold area (see {@link SwaraLyricRowView@fInnerHTML}), and
 * fills it with the HTML content of the notations themselves (i.e. the table 
 * cells inside the row) on calls (by the notation view objects) to 
 * {@link SwaraLyricRowView#addDOMCellAsHTML}. A later call to 
 * {@link SwaraLyricRowView#renderDOMCells} is expected - at which time for 
 * the full notation line content is returned.
 * <p>
 * In both cases, a subsequent call to {@link SwaraLyricRowView#attach} is needed
 * to associate the DOM with the view. In case of progressive rendering, this is 
 * automatic. In case of non-progressive, an separate call to attach is expected later.
 */
@class
represents the view content of a single row (line) of lyrics

Rendering: There are 2 kinds of rendering

 the progressive rendering used in WYSIWYG mode where rendering creates
the actual DOM elements for the heading - done by  LyricRowView#render
when the 'asHTML' parameter to it is false.
 non-progressive rendering used in start-up where render simply generates
the HTML content in a string. This is done by  LyricRowView#render when
the 'asHTML' parameter to it is true.

Both case, depend on  SwaraLyricRowView to do
the real work. The only thing done in render is to decide if the lyric row
is rendered inside the same notation line as its swara row or is it in its
own. The latter will happen only if page break happens between the two.
This is not considered during non-progressive rendering since no pagination
is done during non-progressive (it is done afterwards when rendering of
entire song is done - see #renderContents)

In non-progressive rendering, the HTML content of the  generated by
render, but is actually maintained inside the NotationLine object in an
"hold area" (so that it can gather content for subsequent lyric rows
that belong to it also). The view itself establishes a reference to an
array in the hold area , and
fills it with the HTML content of the notations themselves  on calls (by the notation view objects) to
SwaraLyricRowView#addDOMCellAsHTML. A later call to
SwaraLyricRowView#renderDOMCells is expected - at which time for
the full notation line content is returned.

In both cases, a subsequent call to  SwaraLyricRowView#attach is needed
to associate the DOM with the view. In case of progressive rendering, this is
automatic. In case of non-progressive, an separate call to attach is expected later.
@class represents the view content of a single row ( line ) of lyrics Rendering : There are 2 kinds of rendering the progressive rendering used in WYSIWYG mode where rendering creates the actual DOM elements for the heading - done by LyricRowView#render when the ' asHTML ' parameter to it is false . non - progressive rendering used in start - up where render simply generates the HTML content in a string . This is done by LyricRowView#render when the ' asHTML ' parameter to it is true . Both case depend on SwaraLyricRowView to do the real work . The only thing done in render is to decide if the lyric row is rendered inside the same notation line as its swara row or is it in its own . The latter will happen only if page break happens between the two . This is not considered during non - progressive rendering since no pagination is done during non - progressive ( it is done afterwards when rendering of entire song is done - see #renderContents ) In non - progressive rendering the HTML content of the generated by render but is actually maintained inside the NotationLine object in an " hold area " ( so that it can gather content for subsequent lyric rows that belong to it also ) . The view itself establishes a reference to an array in the hold area and fills it with the HTML content of the notations themselves on calls ( by the notation view objects ) to SwaraLyricRowView#addDOMCellAsHTML . A later call to SwaraLyricRowView#renderDOMCells is expected - at which time for the full notation line content is returned . In both cases a subsequent call to SwaraLyricRowView#attach is needed to associate the DOM with the view . In case of progressive rendering this is automatic . In case of non - progressive an separate call to attach is expected later .
function LyricRowView() 
{
    this.getSwaraRow = function() { return this.fSwaraRow; }
    this.setSwaraRow = function( swaraRow ) {
	this.fSwaraRow = swaraRow;
    }
    this.render = function(asHTML, table, compactLayout, idx) {
	var notationLine = null;
	if( asHTML ) {
	    return this.renderSwaraLyricRow(asHTML, this.fSwaraRow.getNotationLine(), 
	    				    this.fSwaraRow.getTala(), 
					    this.fSwaraRow.getIndexInLayoutCycle(),
					    table, compactLayout, idx);
	}
	if( !idx ) {
	    idx = 0;
	    if( table.rows )
		idx = table.rows.length;
	}
	if(idx >= 0 && table.rows && idx < table.rows.length ) {
	    var tr = table.rows[idx];
	    var view = Utils.getObjForId(tr);
	    if( view && view.partType &&
		 ((view.partType() == PAGEVIEWPART_SWARAROW  
				&& view == this.fSwaraRow) ||  
		    (view.partType() == PAGEVIEWPART_LYRICROW && 	
			view.getSwaraRow() == this.fSwaraRow )) ) 
	    {
		notationLine = this.fSwaraRow.getNotationLine()
	    }
	}
	return this.renderSwaraLyricRow(asHTML, notationLine, this.fSwaraRow.getTala(), 
					this.fSwaraRow.getIndexInLayoutCycle(),
					table, compactLayout, idx);
    }
    this.moveHTMLContents = function(toTable, idx) {
	return this.moveSwaraLyricRowHTMLContents(this.fSwaraRow.getTala(), 
				this.fSwaraRow.getIndexInLayoutCycle(), toTable, idx);
    }
    this.fSwaraRow = null;
}
function LyricRowView ( ) { this . getSwaraRow = function ( ) { return this . fSwaraRow ; } this . setSwaraRow = function ( swaraRow ) { this . fSwaraRow = swaraRow ; } this . render = function ( asHTML , table , compactLayout , idx ) { var notationLine = null ; if ( asHTML ) { return this . renderSwaraLyricRow ( asHTML , this . fSwaraRow . getNotationLine ( ) , this . fSwaraRow . getTala ( ) , this . fSwaraRow . getIndexInLayoutCycle ( ) , table , compactLayout , idx ) ; } if ( ! idx ) { idx = 0 ; if ( table . rows ) idx = table . rows . length ; } if ( idx >= 0 && table . rows && idx < table . rows . length ) { var tr = table . rows [ idx ] ; var view = Utils . getObjForId ( tr ) ; if ( view && view . partType && ( ( view . partType ( ) == PAGEVIEWPART_SWARAROW && view == this . fSwaraRow ) || ( view . partType ( ) == PAGEVIEWPART_LYRICROW && view . getSwaraRow ( ) == this . fSwaraRow ) ) ) { notationLine = this . fSwaraRow . getNotationLine ( ) } } return this . renderSwaraLyricRow ( asHTML , notationLine , this . fSwaraRow . getTala ( ) , this . fSwaraRow . getIndexInLayoutCycle ( ) , table , compactLayout , idx ) ; } this . moveHTMLContents = function ( toTable , idx ) { return this . moveSwaraLyricRowHTMLContents ( this . fSwaraRow . getTala ( ) , this . fSwaraRow . getIndexInLayoutCycle ( ) , toTable , idx ) ; } this . fSwaraRow = null ; }
@class
 represents the view content of a single row (line) of lyrics
 <p>
 <b>Rendering</b>: There are 2 kinds of rendering
 <ul>
 <li> the progressive rendering used in WYSIWYG mode where rendering creates
 the actual DOM elements for the heading - done by {@link LyricRowView#render}
 when the 'asHTML' parameter to it is false.
@class represents the view content of a single row ( line ) of lyrics <p > <b > Rendering< / b > : There are 2 kinds of rendering <ul > <li > the progressive rendering used in WYSIWYG mode where rendering creates the actual DOM elements for the heading - done by { @link LyricRowView#render } when the ' asHTML ' parameter to it is false .
/**
     * get the swara row view associated this lyric row view 
     * 
     * @type SwaraRowView 
     */ /**
     * make the passed-in lyric row as the swara row view associated with this lyric row view
     * @param {SwaraRowView} swaraRow
     */ /**
     * render the lyric row view - either progressively (i.e create DOM
     * objects now), or non-progressively (no DOM, just generate HTML content)
     * <p>
     * This renders (or generates HTML content for) the row view such that
     * it goes inside a NotationLine that is a row at index "idx" in the outer
     * table. If a NotationLine that corresponds to the swara row (or one of 
     * its lyric rows) for this lyric row already exists at idx, then this 
     * lyric row is added to that existing NotationLine. Else a new 
     * NotationLine is created
     *
     * @param	{boolean} asHTML	true => non-progressive rendering,
     *					false => progressive rendering
     * @param	{DOM}	  table		The table in which the notation-line
     *					to which this view belongs to
     * @param   {boolean} compactLayout	compact layout or span to page width?
     * @param	{int}	  idx		index of the notation line in the
     *					table
     * @return the DOM table row that represents the rendering (in this case 
     * the NotationLine) for progressive rendering, and NOTHING MEANINGFUL
     * for non-progressive rendering, since in this case the HTML content of 
     * the lyric row view is added to the notation line HTML content and 
     * maintained there until a later call to renderDOMCells which for the 
     * first SwaraLyricRowView under the NotationLine which will combine all
     * the notation line HTML content and return it
     */ /*
	     * for non-progressive rendering, always reuse swara-row's notation
	     * line. It is presumed that non-progressive rendering has no 
	     * pagination (cant paginate since it requires info which is known 
	     * only upong rendering)
	     */ // figure out idx
 // see if there is an approp existing NotationLine - such a row will
 // have its "view" prop pointing to our swara-row, or will have
 // its view point to a lyric row of our swara-row
 // a swara row
 // OUR swara row!
 // a lyric row
 // whose swara row
 // is OUR swara row!
 // render as a new notation line (notationLine == null) or to existing one
 /**
     * move the HTML contents of the row from one HTML table to another
     * <p>
     * This is an override of TableRowPageViewPart.moveHTMLContents
     *
     * @param {DOM_TABLE}	the new table to which the contents need
     *				to be moved
     * @param {idx}		the index (of the NotationLine) in that table
     */ /**
     * swara-row associated with this lyric row
     * @type SwaraRowView
     * @private
     */