info.aduna.linkmap.export
Class HtmlImageMapExporter

java.lang.Object
  extended by info.aduna.linkmap.export.HtmlImageMapExporter

public class HtmlImageMapExporter
extends Object

A HTMLImageMapExporter is capable of saving a HTML document containing an image map of the Graph rendered by a GraphRenderer to a File or OutputStream. In can be used in combination with a PngImageExporter in order to create the complete map (i.e. HTML document and image file). HtmlImageMapExporter can also be instructed to create only the MAP element, e.g. if the image map is to be included in a HTML template.


Field Summary
static String DEFAULT_FORM
          The default FORM element of the HTML document.
static boolean DEFAULT_FULL_HTML_DOCUMENT
          The default value of the "full HTML document" property.
static String DEFAULT_IMAGE_FILE_NAME
          The default value of the image name property.
static String DEFAULT_MAP_NAME
          The default name of the MAP element, used to refer to the map in the IMG element.
static String DEFAULT_SCRIPT
          The default JavaScript script of the HTML document.
static String DEFAULT_TITLE
          The default title of the HTML document.
 
Constructor Summary
HtmlImageMapExporter(GraphRenderer renderer)
          Create a new HTMLImageMapExporter that will use the specified GraphRenderer for retrieving the Graph and some statistics about it.
 
Method Summary
 void export()
          Exports the HTML document or the MAP element, depending on what was requested, to the installed Writer.
 String getForm()
           
 GraphRenderer getGraphRenderer()
           
 String getImageFileName()
           
 String getMapName()
           
 String getScript()
           
 String getTitle()
           
 Writer getWriter()
           
 boolean isFullHtmlDocument()
           
 void setForm(String form)
          Set the FORM element to be included in the HTML document.
 void setFullHtmlDocument(boolean fullHtmlDocument)
           
 void setImageFileName(String name)
          Set the file name of the image file, to be referenced by the resulting HTML document.
 void setMapName(String mapName)
          Set the name to be used to identify the MAP element.
 void setScript(String script)
          Set the JavaScript fragment to be included in the HTML document.
 void setTitle(String title)
          Set the title of the resulting HTML document.
 void setWriter(Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAP_NAME

public static final String DEFAULT_MAP_NAME
The default name of the MAP element, used to refer to the map in the IMG element.

See Also:
Constant Field Values

DEFAULT_FULL_HTML_DOCUMENT

public static final boolean DEFAULT_FULL_HTML_DOCUMENT
The default value of the "full HTML document" property.

See Also:
Constant Field Values

DEFAULT_SCRIPT

public static final String DEFAULT_SCRIPT
The default JavaScript script of the HTML document.

See Also:
Constant Field Values

DEFAULT_FORM

public static final String DEFAULT_FORM
The default FORM element of the HTML document.

See Also:
Constant Field Values

DEFAULT_TITLE

public static final String DEFAULT_TITLE
The default title of the HTML document.

See Also:
Constant Field Values

DEFAULT_IMAGE_FILE_NAME

public static final String DEFAULT_IMAGE_FILE_NAME
The default value of the image name property.

See Also:
Constant Field Values
Constructor Detail

HtmlImageMapExporter

public HtmlImageMapExporter(GraphRenderer renderer)
Create a new HTMLImageMapExporter that will use the specified GraphRenderer for retrieving the Graph and some statistics about it.

Method Detail

getGraphRenderer

public GraphRenderer getGraphRenderer()

setWriter

public void setWriter(Writer writer)

getWriter

public Writer getWriter()

setMapName

public void setMapName(String mapName)
                throws IllegalArgumentException
Set the name to be used to identify the MAP element.

Throws:
IllegalArgumentException - when the specified String is null.

getMapName

public String getMapName()

setFullHtmlDocument

public void setFullHtmlDocument(boolean fullHtmlDocument)

isFullHtmlDocument

public boolean isFullHtmlDocument()

setScript

public void setScript(String script)
               throws IllegalArgumentException
Set the JavaScript fragment to be included in the HTML document.

Throws:
IllegalArgumentException - when the specified String is null.

getScript

public String getScript()

setForm

public void setForm(String form)
             throws IllegalArgumentException
Set the FORM element to be included in the HTML document.

Throws:
IllegalArgumentException - when the specified String is null.

getForm

public String getForm()

setTitle

public void setTitle(String title)
              throws IllegalArgumentException
Set the title of the resulting HTML document.

Throws:
IllegalArgumentException - when the specified argument is null.

getTitle

public String getTitle()

setImageFileName

public void setImageFileName(String name)
                      throws IllegalArgumentException
Set the file name of the image file, to be referenced by the resulting HTML document.

Throws:
IllegalArgumentException - when the specified argument is null.

getImageFileName

public String getImageFileName()

export

public void export()
Exports the HTML document or the MAP element, depending on what was requested, to the installed Writer. Note that this Writer is not closed by this method.



Copyright © 1997-2008 Aduna. All Rights Reserved.