api/waf/src/se/lu/thep/waf/TagWriter.java

Code
Comments
Other
Rev Date Author Line
805 30 Oct 06 gregory 1 /*
805 30 Oct 06 gregory 2  $Id$
805 30 Oct 06 gregory 3
1916 31 Aug 07 jari 4  Copyright (C) 2006, 2007 Gregory Vincic
805 30 Oct 06 gregory 5
805 30 Oct 06 gregory 6  Files are copyright by their respective authors. The contributions to
805 30 Oct 06 gregory 7  files where copyright is not explicitly stated can be traced with the
805 30 Oct 06 gregory 8  source code revision system.
805 30 Oct 06 gregory 9
805 30 Oct 06 gregory 10  This file is part of Proteios.
805 30 Oct 06 gregory 11  Available at http://www.proteios.org/
805 30 Oct 06 gregory 12
805 30 Oct 06 gregory 13  Proteios-2.x is free software; you can redistribute it and/or
805 30 Oct 06 gregory 14  modify it under the terms of the GNU General Public License
805 30 Oct 06 gregory 15  as published by the Free Software Foundation; either version 2
805 30 Oct 06 gregory 16  of the License, or (at your option) any later version.
805 30 Oct 06 gregory 17
805 30 Oct 06 gregory 18  Proteios is distributed in the hope that it will be useful,
805 30 Oct 06 gregory 19  but WITHOUT ANY WARRANTY; without even the implied warranty of
805 30 Oct 06 gregory 20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
805 30 Oct 06 gregory 21  GNU General Public License for more details.
805 30 Oct 06 gregory 22
805 30 Oct 06 gregory 23  You should have received a copy of the GNU General Public License
805 30 Oct 06 gregory 24  along with this program; if not, write to the Free Software
805 30 Oct 06 gregory 25  Foundation, Inc., 59 Temple Place - Suite 330,
805 30 Oct 06 gregory 26  Boston, MA  02111-1307, USA.
805 30 Oct 06 gregory 27  */
805 30 Oct 06 gregory 28 package se.lu.thep.waf;
805 30 Oct 06 gregory 29
805 30 Oct 06 gregory 30 import se.lu.thep.waf.dom.html.Tag;
805 30 Oct 06 gregory 31 import java.io.PrintWriter;
805 30 Oct 06 gregory 32
805 30 Oct 06 gregory 33 /**
2625 28 Mar 08 gregory 34  * Abstract class for writing tags using a PrintWriter
2625 28 Mar 08 gregory 35  * 
805 30 Oct 06 gregory 36  * @author gregory
805 30 Oct 06 gregory 37  */
805 30 Oct 06 gregory 38 public abstract class TagWriter
805 30 Oct 06 gregory 39 {
2625 28 Mar 08 gregory 40   /**
2625 28 Mar 08 gregory 41    * PrintWriter used for writing
2625 28 Mar 08 gregory 42    */
805 30 Oct 06 gregory 43   protected PrintWriter writer = null;
805 30 Oct 06 gregory 44
805 30 Oct 06 gregory 45
805 30 Oct 06 gregory 46   public TagWriter(PrintWriter writer)
805 30 Oct 06 gregory 47   {
805 30 Oct 06 gregory 48     super();
805 30 Oct 06 gregory 49     this.writer = writer;
805 30 Oct 06 gregory 50   }
805 30 Oct 06 gregory 51
2625 28 Mar 08 gregory 52
805 30 Oct 06 gregory 53   public void flush()
805 30 Oct 06 gregory 54   {
805 30 Oct 06 gregory 55     writer.flush();
805 30 Oct 06 gregory 56   }
805 30 Oct 06 gregory 57
2625 28 Mar 08 gregory 58
2625 28 Mar 08 gregory 59   /**
2625 28 Mar 08 gregory 60    * @param tag to write useing the PrintWriter
2625 28 Mar 08 gregory 61    */
805 30 Oct 06 gregory 62   public abstract void draw(Tag tag);
805 30 Oct 06 gregory 63 }