Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Member Functions | Package Attributes
rene.util.xml.SVGWriter Class Reference
Inheritance diagram for rene.util.xml.SVGWriter:
Inheritance graph
[legend]
Collaboration diagram for rene.util.xml.SVGWriter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SVGWriter (PrintWriter o, String enc, int w, int h)
 SVGWriter (PrintWriter o)
void startSVG (int w, int h)
void close ()
void coord (int x, int y)
void text (String text, int x, int y)
void printTag (String tag, String content)
void printTag (String tag, String arg, String value, String content)
void printTagNewLine (String tag, String content)
void printTagNewLine (String tag, String arg, String value, String content)
void startTag (String tag)
void startTag (String tag, String arg, String value)
void finishTag (String tag, String arg, String value)
void finishTag (String tag)
void finishTag ()
void finishTagNewLine (String tag)
void finishTagNewLine ()
void startTagStart (String tag)
void startTagEnd ()
void startTagEndNewLine ()
void printArg (String arg, String value)
void startTagNewLine (String tag, String arg, String value)
void startTagNewLine (String tag)
void endTag (String tag)
void endTagNewLine (String tag)
void println ()
void println (String s)
void print (String s)
void printEncoding (String s)
void printEncoding ()
void printXml ()
void printXls (String s)
void printParagraphs (String s, int linelength)
void printDoctype (String top, String dtd)

Static Public Member Functions

static void main (String args[]) throws Exception

Package Attributes

int W
int H
PrintWriter Out

Detailed Description

Definition at line 6 of file SVGWriter.java.


Constructor & Destructor Documentation

rene.util.xml.SVGWriter.SVGWriter ( PrintWriter  o,
String  enc,
int  w,
int  h 
) [inline]

Definition at line 9 of file SVGWriter.java.

       {      super(o);
              printEncoding(enc);
              W=w; H=h;
              startTagStart("svg");
              printArg("width",""+w);
              printArg("height",""+h);
              startTagEndNewLine();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

rene.util.xml.SVGWriter.SVGWriter ( PrintWriter  o) [inline]

Definition at line 19 of file SVGWriter.java.

       {      super(o);
       }

Member Function Documentation

void rene.util.xml.SVGWriter.close ( ) [inline]

Reimplemented from rene.util.xml.XmlWriter.

Definition at line 34 of file SVGWriter.java.

       {      endTag("svg");
              super.close();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.SVGWriter.coord ( int  x,
int  y 
) [inline]

Definition at line 39 of file SVGWriter.java.

       {      printArg("x",""+x);
              printArg("y",""+y);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.endTag ( String  tag) [inline, inherited]

Definition at line 89 of file XmlWriter.java.

       {      Out.print("</");
              Out.print(tag);
              Out.print(">");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.endTagNewLine ( String  tag) [inline, inherited]

Definition at line 94 of file XmlWriter.java.

       {      endTag(tag);
              Out.println();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.finishTag ( String  tag,
String  arg,
String  value 
) [inline, inherited]

Definition at line 42 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
              printArg(arg,value);
              Out.println("/>");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.finishTag ( String  tag) [inline, inherited]

Definition at line 48 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
              Out.print("/>");
       }
void rene.util.xml.XmlWriter.finishTag ( ) [inline, inherited]

Definition at line 65 of file XmlWriter.java.

       {      Out.print("/>");
       }
void rene.util.xml.XmlWriter.finishTagNewLine ( String  tag) [inline, inherited]

Definition at line 53 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
              Out.println("/>");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.finishTagNewLine ( ) [inline, inherited]

Definition at line 68 of file XmlWriter.java.

       {      Out.println("/>");
       }
static void rene.util.xml.SVGWriter.main ( String  args[]) throws Exception [inline, static]

Definition at line 52 of file SVGWriter.java.

       {      SVGWriter out=new SVGWriter(
                     new PrintWriter(new FileOutputStream("test.svg")),
                     "",300,300);
              out.text("Hallo Welt",10,95);
              out.startTagStart("path");
              out.printArg("d","M 150 150 A 50 50 0 1 0 100 200");
              out.printArg("style","fill:none;stroke-width:1;stroke:black");
              out.finishTagNewLine();
              out.close();
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.print ( String  s) [inline, inherited]

Definition at line 101 of file XmlWriter.java.

       {      Out.print(XmlTranslator.toXml(s));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.printArg ( String  arg,
String  value 
) [inline, inherited]

Definition at line 74 of file XmlWriter.java.

       {      Out.print(" ");
              print(arg);
              Out.print("=\"");
              print(value);
              Out.print("\"");
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.printDoctype ( String  top,
String  dtd 
) [inline, inherited]

Definition at line 136 of file XmlWriter.java.

       {      Out.print("<!DOCTYPE ");
              Out.print(top);
              Out.print(" SYSTEM \"");
              Out.print(dtd);
              Out.println("\">");
       }
void rene.util.xml.XmlWriter.printEncoding ( String  s) [inline, inherited]

Definition at line 107 of file XmlWriter.java.

       {      if (s.equals("")) Out.println("<?xml version=\"1.0\"?>");
              else Out.println("<?xml version=\"1.0\" encoding=\""+s+"\"?>");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.printEncoding ( ) [inline, inherited]

Definition at line 114 of file XmlWriter.java.

       {      printEncoding("utf-8");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.println ( ) [inline, inherited]

Definition at line 98 of file XmlWriter.java.

       {      Out.println();
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.println ( String  s) [inline, inherited]

Definition at line 104 of file XmlWriter.java.

       {      Out.println(XmlTranslator.toXml(s));
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.printParagraphs ( String  s,
int  linelength 
) [inline, inherited]

Definition at line 120 of file XmlWriter.java.

       {      StringParser p=new StringParser(s);
              Vector v=p.wrapwords(linelength);
              for (int i=0; i<v.size(); i++)
              {      startTag("P");
                     s=(String)v.elementAt(i);
                     StringParser q=new StringParser(s);
                     Vector w=q.wraplines(linelength);
                     for (int j=0; j<w.size(); j++)
                     {      if (j>0) println();
                            s=(String)w.elementAt(j);
                            print(s);
                     }
                     endTagNewLine("P");
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.printTag ( String  tag,
String  content 
) [inline, inherited]

Definition at line 13 of file XmlWriter.java.

       {      startTag(tag);
              print(content);
              endTag(tag);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.printTag ( String  tag,
String  arg,
String  value,
String  content 
) [inline, inherited]

Definition at line 22 of file XmlWriter.java.

       {      startTag(tag,arg,value);
              print(content);
              endTag(tag);
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.printTagNewLine ( String  tag,
String  content 
) [inline, inherited]

Definition at line 18 of file XmlWriter.java.

       {      printTag(tag,content);
              Out.println();
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.printTagNewLine ( String  tag,
String  arg,
String  value,
String  content 
) [inline, inherited]

Definition at line 27 of file XmlWriter.java.

       {      printTag(tag,arg,value,content);
              Out.println();
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.printXls ( String  s) [inline, inherited]

Definition at line 117 of file XmlWriter.java.

       {      Out.println("<?xml-stylesheet href=\""+s+"\" type=\"text/xsl\"?>");
       }
void rene.util.xml.XmlWriter.printXml ( ) [inline, inherited]

Definition at line 111 of file XmlWriter.java.

       {      printEncoding("");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.SVGWriter.startSVG ( int  w,
int  h 
) [inline]

Definition at line 23 of file SVGWriter.java.

       {      printEncoding("utf-8");
              Out.println("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"");
              Out.println("\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">");
              startTagStart("svg");
              printArg("xmlns","http://www.w3.org/2000/svg");
              printArg("width",""+w);
              printArg("height",""+h);
              startTagEndNewLine();
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.startTag ( String  tag) [inline, inherited]

Definition at line 31 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
              Out.print(">");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.startTag ( String  tag,
String  arg,
String  value 
) [inline, inherited]

Definition at line 36 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
              printArg(arg,value);
              Out.print(">");
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.startTagEnd ( ) [inline, inherited]

Definition at line 62 of file XmlWriter.java.

       {      Out.print(">");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.startTagEndNewLine ( ) [inline, inherited]

Definition at line 71 of file XmlWriter.java.

       {      Out.println(">");
       }

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.startTagNewLine ( String  tag,
String  arg,
String  value 
) [inline, inherited]

Definition at line 81 of file XmlWriter.java.

       {      startTag(tag,arg,value);
              Out.println();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.util.xml.XmlWriter.startTagNewLine ( String  tag) [inline, inherited]

Definition at line 85 of file XmlWriter.java.

       {      startTag(tag);
              Out.println();
       }

Here is the call graph for this function:

void rene.util.xml.XmlWriter.startTagStart ( String  tag) [inline, inherited]

Definition at line 58 of file XmlWriter.java.

       {      Out.print("<");
              Out.print(tag);
       }

Here is the caller graph for this function:

void rene.util.xml.SVGWriter.text ( String  text,
int  x,
int  y 
) [inline]

Definition at line 44 of file SVGWriter.java.

       {      startTagStart("text");
              coord(x,y);
              startTagEnd();
              print(text);
              endTagNewLine("text");
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 7 of file SVGWriter.java.

PrintWriter rene.util.xml.XmlWriter.Out [package, inherited]

Definition at line 9 of file XmlWriter.java.

Definition at line 7 of file SVGWriter.java.


The documentation for this class was generated from the following file: