function BreakView() 
{
    /**
     * indicates if this page view part should be skipped after
     * a page break (answer is true for song breaks)
     * @return true or false indicating if this view part should
     *         not be rendered after a page break
     * @type boolean
     */
    this.skipOnPageBreak = function() { return true; }

    /**
     * render the break as a table row
     * @param {int}              ncols	# of columns in the table
     * @param {DOMElement_TABLE} table	the DOM table
     * @param {int} idx		index of row in table (optional, in which case add to end)
     */
    this.render = function(ncols, table, idx) {
	if( !idx ) idx = table.rows.length;
	var tr = table.insertRow(idx);
	tr.className = "SongBreak";	// required for attach below
	var td = Utils.addTableCell(tr, null, ncols);
	td.innerHTML = this.renderInnerAsHTML();
	this.attach(table, tr, idx);
	return tr;
    }

    /**
     * render the HTML contents of the break and return it
     * @return the HTML representation of the table row
     * @type String
     */
    this.renderAsHTML = function(ncols) {
	var s = new Array();
	var i = 0;
	s[i++] = '<tr class="SongBreak"><td colspan="';
	s[i++] = ncols;
	s[i++] = '">';
	s[i++] = this.renderInnerAsHTML();
	s[i++] = '</td></tr>';
	return s.join("");
    }

    /**
     * generate the HTML representation of the inner contents of the break and
     * return it
     * @return the HTML representation of the inner contents of the table cell
     * @type String
     */
    this.renderInnerAsHTML = function() {
	return '<div class="SongBreak"></div>';
    }

    /**
     * attach to the contents of an already rendered table row whose HTML
     * content was generated using this.renderAsHTML or this.render
     *
     * @param {DOMElement_TABLE} table	the table
     * @param {DOMElement_TR}    tr	the table row
     * @param {int}              rowidx	the table row index
     * @return true or false indicating if attach was successful
     * @param boolean
     */
    this.attach = function(table, tr, rowidx) {
	if(tr.className != "SongBreak" ) {
	    alert("attach failed - not break row");
	    return false;
	}
	this.fOuter = tr;	// outer tr
	this.fTable = table;	// outer table
	this.fOuter.id = Utils.getNewId("tr");
	Utils.addToIdMap(this.fOuter,this);
	return true;
    }

    /**
     * @ignore
     */
    this.fPartType = PAGEVIEWPART_BREAK;
}
/**
 * @class
 * represents the break in the song
 * <p>
 * The view is a table-row in a table inside a page represented by {@link PageView}
 * <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 BreakView#render} 
 * <li> non-progressive rendering used in start-up where render simply generates
 * the HTML content in a string. This is done by {@link BreakView#renderAsHTML}
 * </ul>
 * In <u>both</u> cases, the <i>inner</i> (i.e. whats inside the table cell that
 * represents the heading) content is always generated as HTML content in
 * {@link:BreakView#renderInnerAsHTML}. Once this is done, in the progressive
 * rendering case we render it by doing td.innerHTML (where td is the DOM
 * table-cell). In the non-progressive case, we generate the HTML content of 
 * td, and stick the inner HTML content inside and return  the entire content
 *
 * Since in both cases, inner content is generated as a whole and rendered, both
 * cases need a call to {@link BreakView#attach} 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 break in the song

The view is a table-row in a table inside a page represented by  PageView

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  BreakView#render
 non-progressive rendering used in start-up where render simply generates
the HTML content in a string. This is done by  BreakView#renderAsHTML

In both cases, the inner  content is always generated as HTML content in
:BreakView#renderInnerAsHTML. Once this is done, in the progressive
rendering case we render it by doing td.innerHTML (where td is the DOM
table-cell). In the non-progressive case, we generate the HTML content of
td, and stick the inner HTML content inside and return  the entire content

Since in both cases, inner content is generated as a whole and rendered, both
cases need a call to  BreakView#attach 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 break in the song The view is a table - row in a table inside a page represented by PageView 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 BreakView#render non - progressive rendering used in start - up where render simply generates the HTML content in a string . This is done by BreakView#renderAsHTML In both cases the inner content is always generated as HTML content in : BreakView#renderInnerAsHTML . Once this is done in the progressive rendering case we render it by doing td . innerHTML ( where td is the DOM table - cell ) . In the non - progressive case we generate the HTML content of td and stick the inner HTML content inside and return the entire content Since in both cases inner content is generated as a whole and rendered both cases need a call to BreakView#attach 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 BreakView() 
{
    this.skipOnPageBreak = function() { return true; }
    this.render = function(ncols, table, idx) {
	if( !idx ) idx = table.rows.length;
	var tr = table.insertRow(idx);
	tr.className = "SongBreak";	
	var td = Utils.addTableCell(tr, null, ncols);
	td.innerHTML = this.renderInnerAsHTML();
	this.attach(table, tr, idx);
	return tr;
    }
    this.renderAsHTML = function(ncols) {
	var s = new Array();
	var i = 0;
	s[i++] = '<tr class="SongBreak"><td colspan="';
	s[i++] = ncols;
	s[i++] = '">';
	s[i++] = this.renderInnerAsHTML();
	s[i++] = '</td></tr>';
	return s.join("");
    }
    this.renderInnerAsHTML = function() {
	return '<div class="SongBreak"></div>';
    }
    this.attach = function(table, tr, rowidx) {
	if(tr.className != "SongBreak" ) {
	    alert("attach failed - not break row");
	    return false;
	}
	this.fOuter = tr;	
	this.fTable = table;	
	this.fOuter.id = Utils.getNewId("tr");
	Utils.addToIdMap(this.fOuter,this);
	return true;
    }
    this.fPartType = PAGEVIEWPART_BREAK;
}
function BreakView ( ) { this . skipOnPageBreak = function ( ) { return true ; } this . render = function ( ncols , table , idx ) { if ( ! idx ) idx = table . rows . length ; var tr = table . insertRow ( idx ) ; tr . className = "SongBreak" ; var td = Utils . addTableCell ( tr , null , ncols ) ; td . innerHTML = this . renderInnerAsHTML ( ) ; this . attach ( table , tr , idx ) ; return tr ; } this . renderAsHTML = function ( ncols ) { var s = new Array ( ) ; var i = 0 ; s [ i ++ ] = '<tr class="SongBreak"><td colspan="' ; s [ i ++ ] = ncols ; s [ i ++ ] = '">' ; s [ i ++ ] = this . renderInnerAsHTML ( ) ; s [ i ++ ] = '</td></tr>' ; return s . join ( "" ) ; } this . renderInnerAsHTML = function ( ) { return '<div class="SongBreak"></div>' ; } this . attach = function ( table , tr , rowidx ) { if ( tr . className != "SongBreak" ) { alert ( "attach failed - not break row" ) ; return false ; } this . fOuter = tr ; this . fTable = table ; this . fOuter . id = Utils . getNewId ( "tr" ) ; Utils . addToIdMap ( this . fOuter , this ) ; return true ; } this . fPartType = PAGEVIEWPART_BREAK ; }
@class
 represents the break in the song
 <p>
 The view is a table-row in a table inside a page represented by {@link PageView}
 <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 BreakView#render}
 <li> non-progressive rendering used in start-up where render simply generates
 the HTML content in a string.
@class represents the break in the song <p > The view is a table - row in a table inside a page represented by { @link PageView } <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 BreakView#render } <li > non - progressive rendering used in start - up where render simply generates the HTML content in a string .
/**
     * indicates if this page view part should be skipped after
     * a page break (answer is true for song breaks)
     * @return true or false indicating if this view part should
     *         not be rendered after a page break
     * @type boolean
     */ /**
     * render the break as a table row
     * @param {int}              ncols	# of columns in the table
     * @param {DOMElement_TABLE} table	the DOM table
     * @param {int} idx		index of row in table (optional, in which case add to end)
     */ // required for attach below
 /**
     * render the HTML contents of the break and return it
     * @return the HTML representation of the table row
     * @type String
     */ /**
     * generate the HTML representation of the inner contents of the break and
     * return it
     * @return the HTML representation of the inner contents of the table cell
     * @type String
     */ /**
     * attach to the contents of an already rendered table row whose HTML
     * content was generated using this.renderAsHTML or this.render
     *
     * @param {DOMElement_TABLE} table	the table
     * @param {DOMElement_TR}    tr	the table row
     * @param {int}              rowidx	the table row index
     * @return true or false indicating if attach was successful
     * @param boolean
     */ // outer tr
 // outer table
 /**
     * @ignore
     */