function FontSizeSelector() 
{
    /**
     * implementation of @{link EventHandler} interface
     */
    this.onEvent = function(evt, src, data) {
	if( evt == EventManager.EVENT_HEADING_SELECTED ) {
	    this.fHeadingView = src;
	    this.update();
	}
	else if( evt == EventManager.EVENT_MENU_CLOSED )
	    this.setSelected(false);
    }

    /**
     * called when a certain font size is selected (used in testing also)
     * @private
     */
    this.onFontSize = function(sz) {
	if( !this.fHeadingView ) return;
	if( sz == "Default" ) sz = "";
	this.fHeadingView.setFontSize(sz);
	this.update();
    }

    /**
     * implementation of @{link ActionHandler} interface
     */
    this.doAction = function(src, actionID) {
	if( src == this ) {
	    var obj = src.getContent();
	    var x = LookAndFeel.findPosX(obj);
	    var y = LookAndFeel.findPosY(obj) + obj.offsetHeight;
	    this.fFontSizeMenu.show(x,y);
	}
	else {
	    // menu item is selected
	    this.onFontSize(actionID);
	}
    }

    /**
     * override of base-class method to provide real content
     */
    this.provideContent = function() {
	var div = document.createElement("div");
	div.style.fontSize   = "85%";	// need to to this to match toolbar font
	div.style.fontWeight = "bold";	// need to to this to match toolbar font
	div.style.width      = "100%";
	if( !Utils.isIE() )		// IE doesnt support table
	    div.style.display  = "table";	// very important for firefox so that arrow
					// div below has a chance to occupy same
					// height as others (and draw at the bottom)
	div.style.height   = "1.5em";	// give some height
	div.style.width    = "5.75em";


	var div2 = document.createElement("div");
	div2.style.cssFloat = "left";
	div2.style.display  = "inline";
	div2.style.height = "100%";
	div2.style.width  = "4em";
	this.fLabelView = document.createTextNode(this._getFontSize());
	div2.appendChild(this.fLabelView);
	div.appendChild(div2);

	var arrow = document.createElement("div");
	arrow.style.width = "1.75em";
	arrow.style.height = "100%";
	arrow.style.background = LookAndFeel.url("but_arrow.png") + " center right no-repeat";	
	arrow.style.cssFloat = "right";
	arrow.style.display  = "inline";
	div.appendChild(arrow);

	return div;
    }

    /**
     * internal method to get stringized form of the font size
     * @return get stringized form of font size
     * @type String
     * @private
     */
    this._getFontSize = function() {
	var sz = "Default";
	if(this.fHeadingView) {
	     sz = this.fHeadingView.getModel().fFontSize;
	     if( sz == "" ) sz = "Default";
	}
	return sz;
    }

    /**
     * internal method to update display
     * @private
     */
    this.update = function() {
	this.fLabelView.nodeValue = this._getFontSize();
    }

    /**
     * the alignment menu which is popped-up when the selector is selected
     * @type Menu
     * @private
     */
    this.fFontSizeMenu = new Menu();
    this.fFontSizeMenu.initMenu();
    this.fFontSizeMenu.addTextItem( "Default", this, "Default" );
    this.fFontSizeMenu.addTextItem( "8", this, "8" );
    this.fFontSizeMenu.addTextItem( "9", this, "9" );
    this.fFontSizeMenu.addTextItem( "10", this, "10" );
    this.fFontSizeMenu.addTextItem( "11", this, "11" );
    this.fFontSizeMenu.addTextItem( "12", this, "12" );
    this.fFontSizeMenu.addTextItem( "14", this, "14" );
    this.fFontSizeMenu.addTextItem( "16", this, "16" );
    this.fFontSizeMenu.addTextItem( "18", this, "18" );
    this.fFontSizeMenu.addTextItem( "20", this, "20" );
    this.fFontSizeMenu.addTextItem( "22", this, "22" );
    this.fFontSizeMenu.addTextItem( "24", this, "24" );
    this.fFontSizeMenu.addTextItem( "26", this, "26" );
    this.fFontSizeMenu.addTextItem( "28", this, "28" );
    this.fFontSizeMenu.addTextItem( "30", this, "30" );
    this.fFontSizeMenu.addTextItem( "32", this, "32" );

    this.initButton(this, null);
    EventManager.addListener(EventManager.EVENT_HEADING_SELECTED, this);
    EventManager.addListener(EventManager.EVENT_MENU_CLOSED, this);

    /**
     * current heading view being modified
     * @type HeadingView
     * @private
     */
    this.fHeadingView = null;
}
/**
 * @class
 * text font-size selector, which is part of the heading tool bar. It also
 * implements the @{link EventListener} and @{link ActionHandler} interfaces
 */
@class
text font-size selector, which is part of the heading tool bar. It also
implements the @{link EventListener} and @{link ActionHandler} interfaces
@class text font - size selector which is part of the heading tool bar . It also implements the @ { link EventListener } and @ { link ActionHandler } interfaces
function FontSizeSelector() 
{
    this.onEvent = function(evt, src, data) {
	if( evt == EventManager.EVENT_HEADING_SELECTED ) {
	    this.fHeadingView = src;
	    this.update();
	}
	else if( evt == EventManager.EVENT_MENU_CLOSED )
	    this.setSelected(false);
    }
    this.onFontSize = function(sz) {
	if( !this.fHeadingView ) return;
	if( sz == "Default" ) sz = "";
	this.fHeadingView.setFontSize(sz);
	this.update();
    }
    this.doAction = function(src, actionID) {
	if( src == this ) {
	    var obj = src.getContent();
	    var x = LookAndFeel.findPosX(obj);
	    var y = LookAndFeel.findPosY(obj) + obj.offsetHeight;
	    this.fFontSizeMenu.show(x,y);
	}
	else {
	    this.onFontSize(actionID);
	}
    }
    this.provideContent = function() {
	var div = document.createElement("div");
	div.style.fontSize   = "85%";	
	div.style.fontWeight = "bold";	
	div.style.width      = "100%";
	if( !Utils.isIE() )		
	    div.style.display  = "table";	
	div.style.height   = "1.5em";	
	div.style.width    = "5.75em";
	var div2 = document.createElement("div");
	div2.style.cssFloat = "left";
	div2.style.display  = "inline";
	div2.style.height = "100%";
	div2.style.width  = "4em";
	this.fLabelView = document.createTextNode(this._getFontSize());
	div2.appendChild(this.fLabelView);
	div.appendChild(div2);
	var arrow = document.createElement("div");
	arrow.style.width = "1.75em";
	arrow.style.height = "100%";
	arrow.style.background = LookAndFeel.url("but_arrow.png") + " center right no-repeat";	
	arrow.style.cssFloat = "right";
	arrow.style.display  = "inline";
	div.appendChild(arrow);
	return div;
    }
    this._getFontSize = function() {
	var sz = "Default";
	if(this.fHeadingView) {
	     sz = this.fHeadingView.getModel().fFontSize;
	     if( sz == "" ) sz = "Default";
	}
	return sz;
    }
    this.update = function() {
	this.fLabelView.nodeValue = this._getFontSize();
    }
    this.fFontSizeMenu = new Menu();
    this.fFontSizeMenu.initMenu();
    this.fFontSizeMenu.addTextItem( "Default", this, "Default" );
    this.fFontSizeMenu.addTextItem( "8", this, "8" );
    this.fFontSizeMenu.addTextItem( "9", this, "9" );
    this.fFontSizeMenu.addTextItem( "10", this, "10" );
    this.fFontSizeMenu.addTextItem( "11", this, "11" );
    this.fFontSizeMenu.addTextItem( "12", this, "12" );
    this.fFontSizeMenu.addTextItem( "14", this, "14" );
    this.fFontSizeMenu.addTextItem( "16", this, "16" );
    this.fFontSizeMenu.addTextItem( "18", this, "18" );
    this.fFontSizeMenu.addTextItem( "20", this, "20" );
    this.fFontSizeMenu.addTextItem( "22", this, "22" );
    this.fFontSizeMenu.addTextItem( "24", this, "24" );
    this.fFontSizeMenu.addTextItem( "26", this, "26" );
    this.fFontSizeMenu.addTextItem( "28", this, "28" );
    this.fFontSizeMenu.addTextItem( "30", this, "30" );
    this.fFontSizeMenu.addTextItem( "32", this, "32" );
    this.initButton(this, null);
    EventManager.addListener(EventManager.EVENT_HEADING_SELECTED, this);
    EventManager.addListener(EventManager.EVENT_MENU_CLOSED, this);
    this.fHeadingView = null;
}
function FontSizeSelector ( ) { this . onEvent = function ( evt , src , data ) { if ( evt == EventManager . EVENT_HEADING_SELECTED ) { this . fHeadingView = src ; this . update ( ) ; } else if ( evt == EventManager . EVENT_MENU_CLOSED ) this . setSelected ( false ) ; } this . onFontSize = function ( sz ) { if ( ! this . fHeadingView ) return ; if ( sz == "Default" ) sz = "" ; this . fHeadingView . setFontSize ( sz ) ; this . update ( ) ; } this . doAction = function ( src , actionID ) { if ( src == this ) { var obj = src . getContent ( ) ; var x = LookAndFeel . findPosX ( obj ) ; var y = LookAndFeel . findPosY ( obj ) + obj . offsetHeight ; this . fFontSizeMenu . show ( x , y ) ; } else { this . onFontSize ( actionID ) ; } } this . provideContent = function ( ) { var div = document . createElement ( "div" ) ; div . style . fontSize = "85%" ; div . style . fontWeight = "bold" ; div . style . width = "100%" ; if ( ! Utils . isIE ( ) ) div . style . display = "table" ; div . style . height = "1.5em" ; div . style . width = "5.75em" ; var div2 = document . createElement ( "div" ) ; div2 . style . cssFloat = "left" ; div2 . style . display = "inline" ; div2 . style . height = "100%" ; div2 . style . width = "4em" ; this . fLabelView = document . createTextNode ( this . _getFontSize ( ) ) ; div2 . appendChild ( this . fLabelView ) ; div . appendChild ( div2 ) ; var arrow = document . createElement ( "div" ) ; arrow . style . width = "1.75em" ; arrow . style . height = "100%" ; arrow . style . background = LookAndFeel . url ( "but_arrow.png" ) + " center right no-repeat" ; arrow . style . cssFloat = "right" ; arrow . style . display = "inline" ; div . appendChild ( arrow ) ; return div ; } this . _getFontSize = function ( ) { var sz = "Default" ; if ( this . fHeadingView ) { sz = this . fHeadingView . getModel ( ) . fFontSize ; if ( sz == "" ) sz = "Default" ; } return sz ; } this . update = function ( ) { this . fLabelView . nodeValue = this . _getFontSize ( ) ; } this . fFontSizeMenu = new Menu ( ) ; this . fFontSizeMenu . initMenu ( ) ; this . fFontSizeMenu . addTextItem ( "Default" , this , "Default" ) ; this . fFontSizeMenu . addTextItem ( "8" , this , "8" ) ; this . fFontSizeMenu . addTextItem ( "9" , this , "9" ) ; this . fFontSizeMenu . addTextItem ( "10" , this , "10" ) ; this . fFontSizeMenu . addTextItem ( "11" , this , "11" ) ; this . fFontSizeMenu . addTextItem ( "12" , this , "12" ) ; this . fFontSizeMenu . addTextItem ( "14" , this , "14" ) ; this . fFontSizeMenu . addTextItem ( "16" , this , "16" ) ; this . fFontSizeMenu . addTextItem ( "18" , this , "18" ) ; this . fFontSizeMenu . addTextItem ( "20" , this , "20" ) ; this . fFontSizeMenu . addTextItem ( "22" , this , "22" ) ; this . fFontSizeMenu . addTextItem ( "24" , this , "24" ) ; this . fFontSizeMenu . addTextItem ( "26" , this , "26" ) ; this . fFontSizeMenu . addTextItem ( "28" , this , "28" ) ; this . fFontSizeMenu . addTextItem ( "30" , this , "30" ) ; this . fFontSizeMenu . addTextItem ( "32" , this , "32" ) ; this . initButton ( this , null ) ; EventManager . addListener ( EventManager . EVENT_HEADING_SELECTED , this ) ; EventManager . addListener ( EventManager . EVENT_MENU_CLOSED , this ) ; this . fHeadingView = null ; }
@class
 text font-size selector, which is part of the heading tool bar.
@class text font - size selector which is part of the heading tool bar .
/**
     * implementation of @{link EventHandler} interface
     */ /**
     * called when a certain font size is selected (used in testing also)
     * @private
     */ /**
     * implementation of @{link ActionHandler} interface
     */ // menu item is selected
 /**
     * override of base-class method to provide real content
     */ // need to to this to match toolbar font
 // need to to this to match toolbar font
 // IE doesnt support table
 // very important for firefox so that arrow
 // div below has a chance to occupy same
 // height as others (and draw at the bottom)
 // give some height
 /**
     * internal method to get stringized form of the font size
     * @return get stringized form of font size
     * @type String
     * @private
     */ /**
     * internal method to update display
     * @private
     */ /**
     * the alignment menu which is popped-up when the selector is selected
     * @type Menu
     * @private
     */ /**
     * current heading view being modified
     * @type HeadingView
     * @private
     */