simtools.ui
Class HTMLWriter

java.lang.Object
  extended by simtools.ui.HTMLWriter

public class HTMLWriter
extends java.lang.Object


Field Summary
static BasicMessageWriter messageWriter
           
protected  java.io.BufferedWriter writer
           
 
Constructor Summary
HTMLWriter(java.io.BufferedWriter writer)
           
 
Method Summary
 void writeBegin()
           
 void writeEnd()
           
 void writeFile(java.net.URL url)
          Write file contents
 void writeH1(java.lang.String title, java.lang.String link)
           
 void writeH2(java.lang.String title, java.lang.String link)
           
 void writeH3(java.lang.String title, java.lang.String link)
           
 void writeImage(java.lang.String imagePath, java.lang.String title)
           
 void writeImage(java.lang.String imagePath, java.lang.String title, java.lang.String imageMap, java.lang.String[][] targets)
          Write HTML code for an image which contains zones linked to targets
 void writeLi(java.lang.String target, java.lang.String title)
           
 void writeP(java.lang.String par, java.lang.String link)
          Write HTML code for a paragraph.
 void writeSeparator()
           
 void writeTab(java.lang.String[] titles, java.util.ArrayList contents)
          Write HTML code for an array.
 void writeTarget(java.lang.String target)
           
 void writeULBegin()
           
 void writeULEnd()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageWriter

public static BasicMessageWriter messageWriter

writer

protected java.io.BufferedWriter writer
Constructor Detail

HTMLWriter

public HTMLWriter(java.io.BufferedWriter writer)
Method Detail

writeBegin

public void writeBegin()
                throws java.io.IOException
Throws:
java.io.IOException

writeEnd

public void writeEnd()
              throws java.io.IOException
Throws:
java.io.IOException

writeH1

public void writeH1(java.lang.String title,
                    java.lang.String link)
             throws java.io.IOException
Throws:
java.io.IOException

writeSeparator

public void writeSeparator()
                    throws java.io.IOException
Throws:
java.io.IOException

writeH2

public void writeH2(java.lang.String title,
                    java.lang.String link)
             throws java.io.IOException
Throws:
java.io.IOException

writeImage

public void writeImage(java.lang.String imagePath,
                       java.lang.String title)
                throws java.io.IOException
Parameters:
imagePath -
title -
Throws:
java.io.IOException

writeImage

public void writeImage(java.lang.String imagePath,
                       java.lang.String title,
                       java.lang.String imageMap,
                       java.lang.String[][] targets)
                throws java.io.IOException
Write HTML code for an image which contains zones linked to targets

Parameters:
imagePath -
title -
imageMap -
targets. - List of targets. A target is an array of 5 components : left-x, top-y, right-x, bottom-y and target name
Throws:
java.io.IOException

writeP

public void writeP(java.lang.String par,
                   java.lang.String link)
            throws java.io.IOException
Write HTML code for a paragraph.

Parameters:
par -
target -
Throws:
java.io.IOException

writeULBegin

public void writeULBegin()
                  throws java.io.IOException
Throws:
java.io.IOException

writeULEnd

public void writeULEnd()
                throws java.io.IOException
Throws:
java.io.IOException

writeLi

public void writeLi(java.lang.String target,
                    java.lang.String title)
             throws java.io.IOException
Throws:
java.io.IOException

writeTarget

public void writeTarget(java.lang.String target)
                 throws java.io.IOException
Throws:
java.io.IOException

writeH3

public void writeH3(java.lang.String title,
                    java.lang.String link)
             throws java.io.IOException
Throws:
java.io.IOException

writeTab

public void writeTab(java.lang.String[] titles,
                     java.util.ArrayList contents)
              throws java.io.IOException
Write HTML code for an array.

Parameters:
titles, - list of titles
contents, - array contents
Throws:
java.io.IOException

writeFile

public void writeFile(java.net.URL url)
               throws java.io.IOException,
                      java.io.FileNotFoundException
Write file contents

Parameters:
file -
Throws:
java.io.IOException
java.io.FileNotFoundException