You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2004/12/06 02:03:42 UTC

cvs commit: incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor HtmlEditorRenderer.java HtmlEditor.java

svieujot    2004/12/05 17:03:42

  Modified:    src/components/org/apache/myfaces/custom/htmlEditor
                        HtmlEditorRenderer.java HtmlEditor.java
  Log:
  Bugfix : getter now use boolean instead of Boolean, and setters created.
  
  Revision  Changes    Path
  1.10      +12 -9     incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorRenderer.java
  
  Index: HtmlEditorRenderer.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorRenderer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HtmlEditorRenderer.java	4 Dec 2004 03:50:44 -0000	1.9
  +++ HtmlEditorRenderer.java	6 Dec 2004 01:03:42 -0000	1.10
  @@ -33,6 +33,9 @@
    * @author Sylvain Vieujot (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.10  2004/12/06 01:03:42  svieujot
  + * Bugfix : getter now use boolean instead of Boolean, and setters created.
  + *
    * Revision 1.9  2004/12/04 03:50:44  svieujot
    * Remove bug for IE
    *
  @@ -153,7 +156,7 @@
   				writer.writeAttribute(HTML.CLASS_ATTR, "kupu-tb-buttongroup",null);
       			writer.writeAttribute(HTML.ID_ATTR, "kupu=logo",null);
       			writer.writeAttribute(HTML.STYLE_ATTR,
  -    			        editor.isAddKupuLogo().booleanValue() ? "float: right" : "display: none",
  +    			        editor.isAddKupuLogo() ? "float: right" : "display: none",
       			        null);
       				writer.startElement(HTML.BUTTON_ELEM,null);
       				writer.writeAttribute(HTML.TYPE_ATTR, "button",null);
  @@ -590,7 +593,7 @@
               	writer.startElement(HTML.DIV_ELEM, null);
               	writer.writeAttribute(HTML.CLASS_ATTR, "kupu-toolbox", null);
               	writer.writeAttribute(HTML.ID_ATTR, "kupu-toolbox-properties", null);
  -            	if( ! editor.isShowPropertiesToolBox().booleanValue() ){
  +            	if( ! editor.isShowPropertiesToolBox() ){
               	    writer.writeAttribute(HTML.STYLE_ATTR, "display: none", null);
               	}
               		writer.startElement(HTML.H1_ELEM, null);
  @@ -617,7 +620,7 @@
               	writer.startElement(HTML.DIV_ELEM, null);
               	writer.writeAttribute(HTML.CLASS_ATTR, "kupu-toolbox", null);
               	writer.writeAttribute(HTML.ID_ATTR, "kupu-toolbox-links", null);
  -            	if( ! editor.isShowLinksToolBox().booleanValue() ){
  +            	if( ! editor.isShowLinksToolBox() ){
               	    writer.writeAttribute(HTML.STYLE_ATTR, "display: none", null);
               	}
               		writer.startElement(HTML.H1_ELEM, null);
  @@ -663,7 +666,7 @@
               	writer.startElement(HTML.DIV_ELEM, null);
               	writer.writeAttribute(HTML.CLASS_ATTR, "kupu-toolbox", null);
               	writer.writeAttribute(HTML.ID_ATTR, "kupu-toolbox-images", null);
  -            	if( ! editor.isShowImagesToolBox().booleanValue() ){
  +            	if( ! editor.isShowImagesToolBox() ){
               	    writer.writeAttribute(HTML.STYLE_ATTR, "display: none", null);
               	}
               		writer.startElement(HTML.H1_ELEM, null);
  @@ -728,7 +731,7 @@
               	writer.startElement(HTML.DIV_ELEM, null);
               	writer.writeAttribute(HTML.CLASS_ATTR, "kupu-toolbox", null);
               	writer.writeAttribute(HTML.ID_ATTR, "kupu-toolbox-tables", null);
  -            	if( ! editor.isShowTablesToolBox().booleanValue() ){
  +            	if( ! editor.isShowTablesToolBox() ){
               	    writer.writeAttribute(HTML.STYLE_ATTR, "display: none", null);
               	}
               		writer.startElement(HTML.H1_ELEM, null);
  @@ -823,7 +826,7 @@
               	writer.startElement(HTML.DIV_ELEM, null);
               	writer.writeAttribute(HTML.CLASS_ATTR, "kupu-toolbox", null);
               	writer.writeAttribute(HTML.ID_ATTR, "kupu-toolbox-debug", null);
  -            	if( ! editor.isShowDebugToolBox().booleanValue() ){
  +            	if( ! editor.isShowDebugToolBox() ){
               	    writer.writeAttribute(HTML.STYLE_ATTR, "display: none", null);
               	}
               		writer.startElement(HTML.H1_ELEM, null);
  @@ -871,9 +874,9 @@
           String text = "<html><body>"+(String) editor.getValue()+"</body></html>";
           String encodedText = text == null ? "" : JavascriptUtils.encodeString( text );
           
  -        Boolean formularMode = editor.isEnableFlexiTools();
  +        boolean formularMode = editor.isEnableFlexiTools();
           
  -        if( formularMode.booleanValue() )
  +        if( formularMode )
               AddResource.addJavaScriptToHeader(HtmlEditorRenderer.class, "flexitools/flexitools.js", context);
           
           AddResource.addJavaScriptToHeader(HtmlEditorRenderer.class, "myFacesUtils.js", context);
  
  
  
  1.7       +57 -27    incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditor.java
  
  Index: HtmlEditor.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HtmlEditor.java	4 Dec 2004 22:25:36 -0000	1.6
  +++ HtmlEditor.java	6 Dec 2004 01:03:42 -0000	1.7
  @@ -26,6 +26,9 @@
    * @author Sylvain Vieujot (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.7  2004/12/06 01:03:42  svieujot
  + * Bugfix : getter now use boolean instead of Boolean, and setters created.
  + *
    * Revision 1.6  2004/12/04 22:25:36  svieujot
    * *** empty log message ***
    *
  @@ -135,6 +138,9 @@
       	ValueBinding vb = getValueBinding("style");
      		return vb != null ? (String)vb.getValue(getFacesContext()) : null;
       }
  +    public void setStyle(String style){
  +   		this._style = style;
  +    }
       
       public String getStyleClass(){
      		if (_styleClass != null)
  @@ -142,6 +148,9 @@
       	ValueBinding vb = getValueBinding("styleClass");
      		return vb != null ? (String)vb.getValue(getFacesContext()) : null;
       }
  +    public void setStyleClass(String styleClass){
  +   		this._style = styleClass;
  +    }
       
       public Boolean isAllowEditSource(){
      		if (_allowEditSource != null)
  @@ -150,60 +159,81 @@
      		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.TRUE;
       }
       
  -    public Boolean isAddKupuLogo(){
  +    public boolean isAddKupuLogo(){
      		if (_addKupuLogo != null)
  -   		    return _addKupuLogo;
  +   		    return _addKupuLogo.booleanValue();
      		ValueBinding vb = getValueBinding("addKupuLogo");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.TRUE;
  +   		return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : true;
  +    }
  +    public void setAddKupuLogo(boolean addKupuLogo){
  +        this._addKupuLogo = Boolean.valueOf(addKupuLogo);
       }
       
  -    public Boolean isShowPropertiesToolBox(){
  +    public boolean isShowPropertiesToolBox(){
      		if (_showPropertiesToolBox != null)
  -   		    return _showPropertiesToolBox;
  +   		    return _showPropertiesToolBox.booleanValue();
       	ValueBinding vb = getValueBinding("showPropertiesToolBox");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setShowPropertiesToolBox(boolean showPropertiesToolBox){
  +        this._showPropertiesToolBox = Boolean.valueOf(showPropertiesToolBox);
       }
       
  -    public Boolean isShowLinksToolBox(){
  +    public boolean isShowLinksToolBox(){
      		if (_showLinksToolBox != null)
  -   		    return _showLinksToolBox;
  +   		    return _showLinksToolBox.booleanValue();
       	ValueBinding vb = getValueBinding("showLinksToolBox");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setShowLinksToolBox(boolean showLinksToolBox){
  +        this._showLinksToolBox = Boolean.valueOf(showLinksToolBox);
       }
       
  -    public Boolean isShowImagesToolBox(){
  +    public boolean isShowImagesToolBox(){
      		if (_showImagesToolBox != null)
  -   		    return _showImagesToolBox;
  +   		    return _showImagesToolBox.booleanValue();
       	ValueBinding vb = getValueBinding("showImagesToolBox");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setShowImagesToolBox(boolean showImagesToolBox){
  +        this._showImagesToolBox = Boolean.valueOf(showImagesToolBox);
       }
       
  -    public Boolean isShowTablesToolBox(){
  +    public boolean isShowTablesToolBox(){
      		if (_showTablesToolBox != null)
  -   		    return _showTablesToolBox;
  +   		    return _showTablesToolBox.booleanValue();
       	ValueBinding vb = getValueBinding("showTablesToolBox");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setShowTablesToolBox(boolean showTablesToolBox){
  +        this._showTablesToolBox = Boolean.valueOf(showTablesToolBox);
       }
       
  -    public Boolean isShowDebugToolBox(){
  +    public boolean isShowDebugToolBox(){
      		if (_showDebugToolBox != null)
  -   		    return _showDebugToolBox;
  +   		    return _showDebugToolBox.booleanValue();
       	ValueBinding vb = getValueBinding("showDebugToolBox");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setShowDebugToolBox(boolean showTablesToolBox){
  +        this._showDebugToolBox = Boolean.valueOf(showTablesToolBox);
       }
       
       public boolean isShowAnyToolBox(){
  -   		return isShowPropertiesToolBox().booleanValue()
  -   			|| isShowLinksToolBox().booleanValue()
  -   			|| isShowImagesToolBox().booleanValue()
  -   			|| isShowTablesToolBox().booleanValue()
  -   			|| isShowDebugToolBox().booleanValue();
  +   		return isShowPropertiesToolBox()
  +   			|| isShowLinksToolBox()
  +   			|| isShowImagesToolBox()
  +   			|| isShowTablesToolBox()
  +   			|| isShowDebugToolBox();
       }
       
  -    public Boolean isEnableFlexiTools(){
  +    public boolean isEnableFlexiTools(){
      		if (_enableFlexiTools != null)
  -   		    return _enableFlexiTools;
  +   		    return _enableFlexiTools.booleanValue();
       	ValueBinding vb = getValueBinding("formularMode");
  -   		return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
  +    	return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
  +    }
  +    public void setEnableFlexiTools(boolean formularMode){
  +        this._enableFlexiTools = Boolean.valueOf(formularMode);
       }
   }