805 |
30 Oct 06 |
gregory |
1 |
/* |
805 |
30 Oct 06 |
gregory |
$Id$ |
805 |
30 Oct 06 |
gregory |
3 |
|
1916 |
31 Aug 07 |
jari |
Copyright (C) 2006, 2007 Gregory Vincic |
805 |
30 Oct 06 |
gregory |
5 |
|
805 |
30 Oct 06 |
gregory |
Files are copyright by their respective authors. The contributions to |
805 |
30 Oct 06 |
gregory |
files where copyright is not explicitly stated can be traced with the |
805 |
30 Oct 06 |
gregory |
source code revision system. |
805 |
30 Oct 06 |
gregory |
9 |
|
805 |
30 Oct 06 |
gregory |
This file is part of Proteios. |
805 |
30 Oct 06 |
gregory |
Available at http://www.proteios.org/ |
805 |
30 Oct 06 |
gregory |
12 |
|
805 |
30 Oct 06 |
gregory |
Proteios-2.x is free software; you can redistribute it and/or |
805 |
30 Oct 06 |
gregory |
modify it under the terms of the GNU General Public License |
805 |
30 Oct 06 |
gregory |
as published by the Free Software Foundation; either version 2 |
805 |
30 Oct 06 |
gregory |
of the License, or (at your option) any later version. |
805 |
30 Oct 06 |
gregory |
17 |
|
805 |
30 Oct 06 |
gregory |
Proteios is distributed in the hope that it will be useful, |
805 |
30 Oct 06 |
gregory |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
805 |
30 Oct 06 |
gregory |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
805 |
30 Oct 06 |
gregory |
GNU General Public License for more details. |
805 |
30 Oct 06 |
gregory |
22 |
|
805 |
30 Oct 06 |
gregory |
You should have received a copy of the GNU General Public License |
805 |
30 Oct 06 |
gregory |
along with this program; if not, write to the Free Software |
805 |
30 Oct 06 |
gregory |
Foundation, Inc., 59 Temple Place - Suite 330, |
805 |
30 Oct 06 |
gregory |
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 |
* Abstract class for writing tags using a PrintWriter |
2625 |
28 Mar 08 |
gregory |
35 |
* |
805 |
30 Oct 06 |
gregory |
* @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 |
* 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 |
* @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 |
} |