net.sf.tomp.highlight.html
Class Java2HTML

java.lang.Object
  extended bynet.sf.tomp.highlight.html.Java2HTML

public class Java2HTML
extends java.lang.Object

Author:
tomp

Field Summary
protected static boolean ADD_LINE_ANCHORS
           
protected static java.lang.String DEFAULT_STYLE_TABLE
           
protected static boolean SHOW_LINE_NUMBERS
           
protected static boolean SHOW_TABLE_BORDER
           
protected static int TAB_SIZE
           
 
Constructor Summary
Java2HTML()
           
 
Method Summary
protected static javax.xml.transform.Source asSource(java.lang.String src)
           
static javax.xml.transform.Source java2html(java.lang.String src)
           
static javax.xml.transform.Source java2html(java.lang.String src, boolean showLineNumbers, int tabSize, boolean showTableBorder, boolean addLineAnchors, java.lang.String fileName, java.lang.String styletable)
          Creates a StreamSource with the highlighted source code src
static javax.xml.transform.Source java2html(java.lang.String src, boolean showLineNumbers, java.lang.String fileName, java.lang.String styletable)
           
static javax.xml.transform.Source java2html(java.lang.String src, java.lang.String filename)
           
static javax.xml.transform.Source java2html(java.lang.String src, java.lang.String filename, java.lang.String styletable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAB_SIZE

protected static int TAB_SIZE

SHOW_LINE_NUMBERS

protected static boolean SHOW_LINE_NUMBERS

SHOW_TABLE_BORDER

protected static boolean SHOW_TABLE_BORDER

ADD_LINE_ANCHORS

protected static boolean ADD_LINE_ANCHORS

DEFAULT_STYLE_TABLE

protected static java.lang.String DEFAULT_STYLE_TABLE
Constructor Detail

Java2HTML

public Java2HTML()
Method Detail

java2html

public static javax.xml.transform.Source java2html(java.lang.String src)
Parameters:
src - the orig. source code
Returns:
Simplest version of java2html with all default options

java2html

public static javax.xml.transform.Source java2html(java.lang.String src,
                                                   java.lang.String filename)
Parameters:
src - the orig. source code
Returns:
Simplest version of java2html with all default options

java2html

public static javax.xml.transform.Source java2html(java.lang.String src,
                                                   java.lang.String filename,
                                                   java.lang.String styletable)
Parameters:
src - the orig. source code
Returns:
Simplest version of java2html with all default options

java2html

public static javax.xml.transform.Source java2html(java.lang.String src,
                                                   boolean showLineNumbers,
                                                   java.lang.String fileName,
                                                   java.lang.String styletable)
Parameters:
src - the orig. source code
showLineNumbers - whether to show line numbers
Returns:
Simple version of java2html with some default options

java2html

public static javax.xml.transform.Source java2html(java.lang.String src,
                                                   boolean showLineNumbers,
                                                   int tabSize,
                                                   boolean showTableBorder,
                                                   boolean addLineAnchors,
                                                   java.lang.String fileName,
                                                   java.lang.String styletable)
Creates a StreamSource with the highlighted source code src

Parameters:
src - the orig. source code
showLineNumbers - whether to show line numbers
tabSize - which tab size
showTableBorder - whether to showTableBorder
addLineAnchors - whether to addLineAnchors
Returns:
the StreamSource with the highlighted source code, in case of an error, the orig. src is returned.

asSource

protected static javax.xml.transform.Source asSource(java.lang.String src)


Copyright © 2004 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.