com.mindfusion.diagramming
Class HtmlBuilder

java.lang.Object
  extended by com.mindfusion.diagramming.HtmlBuilder

public class HtmlBuilder
extends java.lang.Object

Provides helper methods for building HTML image maps.


Constructor Summary
HtmlBuilder(Diagram diagram)
          Initializes a new HtmlBuilder instance.
 
Method Summary
 java.lang.String createImageHtml(java.lang.String htmlFileName, java.lang.String htmlTitle, java.lang.String imgLocalPath, java.lang.String imgURL, java.lang.String imgFormat)
          Exports a diagram image file and generates the code for an html page that displays that file along with the html image map that corresponds to the diagram.
 java.lang.String createImageMap(java.lang.String mapName)
          Creates an HTML image map.
 java.lang.String createUseMapAttr(java.lang.String mapID)
          Creates a USEMAP attribute for the specified image map.
 boolean getAreasForTableCells()
          Gets a value indicating whether image map AREA elements will be created for tables' cells.
 java.lang.String getExpandBtnHyperLink()
          Gets a hyperlink assigned to the AREA elements created for expand/collapse buttons.
 java.lang.String getLinkTarget()
          Gets the name of the target frame where hyperlinks should be opened.
 float getScale()
           
 void setAreasForTableCells(boolean value)
          Sets a value indicating whether image map AREA elements should be created for tables' cells.
 void setExpandBtnHyperLink(java.lang.String value)
          Sets a hyperlink that should be assigned to the AREA elements created for expand/collapse buttons.
 void setLinkTarget(java.lang.String value)
          Sets the name of the target frame where hyperlinks should be opened.
 void setScale(float scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlBuilder

public HtmlBuilder(Diagram diagram)
Initializes a new HtmlBuilder instance.

Parameters:
diagram - The Diagram whose contents should be exported to HTML.
Method Detail

getLinkTarget

public java.lang.String getLinkTarget()
Gets the name of the target frame where hyperlinks should be opened.

Returns:
A String object containing the target frame name.

setLinkTarget

public void setLinkTarget(java.lang.String value)
Sets the name of the target frame where hyperlinks should be opened.

Parameters:
value - A String containing the name of the target frame.

getAreasForTableCells

public boolean getAreasForTableCells()
Gets a value indicating whether image map AREA elements will be created for tables' cells.

Returns:
true if cell areas will be created, otherwise false.

setAreasForTableCells

public void setAreasForTableCells(boolean value)
Sets a value indicating whether image map AREA elements should be created for tables' cells.

Parameters:
value - true if cell areas should be created, otherwise false.

getExpandBtnHyperLink

public java.lang.String getExpandBtnHyperLink()
Gets a hyperlink assigned to the AREA elements created for expand/collapse buttons.

Returns:
A String object containing the hyperlink.

setExpandBtnHyperLink

public void setExpandBtnHyperLink(java.lang.String value)
Sets a hyperlink that should be assigned to the AREA elements created for expand/collapse buttons.

Parameters:
value - A String object containing the hyperlink.

createImageMap

public java.lang.String createImageMap(java.lang.String mapName)
Creates an HTML image map.

Parameters:
mapName - A String containing the map element ID.
Returns:
A String object containing the image map tags.

createUseMapAttr

public java.lang.String createUseMapAttr(java.lang.String mapID)
Creates a USEMAP attribute for the specified image map.

Parameters:
mapID - A String containing the map element ID.
Returns:
A String object containing the USEMAP code.

createImageHtml

public java.lang.String createImageHtml(java.lang.String htmlFileName,
                                        java.lang.String htmlTitle,
                                        java.lang.String imgLocalPath,
                                        java.lang.String imgURL,
                                        java.lang.String imgFormat)
                                 throws java.io.IOException
Exports a diagram image file and generates the code for an html page that displays that file along with the html image map that corresponds to the diagram.

Parameters:
htmlFileName - The name of the html file that should be created.
htmlTitle - The title of the HTML page.
imgLocalPath - The name of the exported image file.
imgURL - The URL of the image file.
imgFormat - The format of the exported image.
Returns:
A String object containing the HTML code.
Throws:
java.io.IOException

getScale

public float getScale()

setScale

public void setScale(float scale)