Logo
Distributed Genetic Programming Framework
print print

File org.sfc.xml.formats.CSSBuilder.java

Here you can find all the information about the file org.sfc.xml.formats.CSSBuilder.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2005 Thomas Weise
 * 
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2005-08-20 19:19:03
 * Original Filename: org.sfc.xml.formats.CSSBuilder.java
 * Version          : 1.0.2
 * Last modification: 2006-03-07
 *                by: Thomas Weise
 * 
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *                    
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */

 
package org.sfc.xml.formats;

import org.sfc.utils.ICloneable;

/**
 * This class helps you to build css stylesheets in a simple way in
 * memory.
 *
 * @author Thomas Weise
 */

public class CSSBuilder extends Stylesheet implements  ICloneable
  {
/**
 * The internal string builder.
 */

  private StringBuilder m_sb;
  
/**
 * Create a new css builder.
 */

  public  CSSBuilder  ()
    {
    super();
    this.m_sb = new StringBuilder();
    }
  
/**
 * Create a copy of this css builder.
 * @return A perfect copy of this css builder.
 */

  public  final CSSBuilder  copy  ()
    {
    CSSBuilder  l_sb;
    
    try
      {
      l_sb = ((CSSBuilder)(super.clone()));
      }
    catch(CloneNotSupportedException l_t)
      {
      return null;
      }
    
    l_sb.m_sb = new StringBuilder();
    l_sb.m_sb.append(this.m_sb);
    return l_sb;
    }
  
/**
 * Create a copy of this css builder.
 * @return A perfect copy of this css builder.
 */

  @Override
  public  final Object  clone ()
    {
    return copy();
    }
  
/**
 * Internally write a character.
 * @param p_char  The character to be written.
 */

  @Override
  final void  write (final  char  p_char)
    {
    this.m_sb.append(p_char);
    }
  
/**
 * Internally write a string.
 * @param p_string  The string to be written.
 */

  @Override
  final void  write (final  String p_string)
    {
    this.m_sb.append(p_string);
    }
  
  
  
/**
 * Return the string representation of this object, that is, the stylesheet
 * data.
 * @return  The string containing the complete stylesheet.
 */

  @Override
  public  final String  toString  ()
    {
    return this.m_sb.toString();
    }
  }

File Information:

file name:CSSBuilder.java
package:org.sfc.xml.formats
qualified name:org.sfc.xml.formats.CSSBuilder.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/sfc/xml/formats/CSSBuilder.java
size:2.798 KB (2866 B)
uploaded: 2015-07-22 04:11:13 GMT+0000
last update: 2006-03-07 04:20:28 GMT+0000
last access: 2018-01-23 19:47:07 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2018-01-23 19:47:07 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo