de.betabeans.scroogexhtml
Class ScroogeXHTMLBase

java.lang.Object
  |
  +--de.betabeans.scroogexhtml.ScroogeXHTMLBase
Direct Known Subclasses:
ScroogeXHTMLMain

public class ScroogeXHTMLBase
extends java.lang.Object

ScroogeXHTMLBase is the base class for ScroogeXHTML. It defines most of its properties and implements some low-level methods for debugging and for the XHTML conversion.
Note that future implementations could change the design and move the textElementToXHTML method to a helper class, making ScroogeXHTML more modular.

Author:
Michael

Field Summary
protected  boolean abortConversion
          set this property to true to abort the conversion
protected  boolean addOuterHTML
          set this property to include surrounding opening and closing html and body tags
protected  java.util.Vector afterTextConversionListeners
          the text element listeners.
protected static java.lang.String BETABEANS_URL
          BetaBeans URL
protected static java.lang.String CONTENT_TYPE_8859_1
          ISO 8859-1 content type definition
protected  boolean convertFontBGColor
          set this property to convert text background colors
protected  boolean convertFontColor
          set this property to convert text foreground colors
protected  boolean convertFontHLColor
          set this property to convert text highlight colors
protected  boolean convertFontName
          set this property to convert font names
protected  boolean convertFontSize
          set this property to convert font sizes
protected  boolean convertFontStyle
          set this property to convert font styles (bold, italic, underline...)
protected  boolean convertHyperlinks
          set this property to call the hyperlink listeners
protected  boolean convertSpaces
          set this property to convert spaces to   tags
protected  int curFontCSet
          the current font character set
protected  java.lang.StringBuffer curFontName
          the current font name
protected  int curFontNr
          the current font number
protected  java.lang.String curFontType
          the current font type
protected static java.lang.String DEFAULT_FONT_COLOR
          default font color (default: black)
protected static java.lang.String DEFAULT_FONT_NAME
          default font name (default: 'Times,serif')
protected static int DEFAULT_FONT_SIZE
          default font size (default: 12 pt)
protected  java.lang.String defaultFontColor
          set this property to the default font color of your RTF document.
protected  java.lang.String defaultFontName
          set this property to the default font name of your RTF document.
protected  int defaultFontNr
          the default Font number
protected  int defaultFontSize
          set this property to the default font size of your RTF document.
protected static java.lang.String DOCTYPE_XHTML_10_STRICT
          XHTML 1.0 Strict DOCTYPE definition
protected static java.lang.String DOCTYPE_XHTML_10_TRANSITIONAL
          XHTML 1.0 Transitional DOCTYPE definition
protected  java.lang.String documentTitle
          set this property to the XHTML document title
protected  java.lang.String headTags
          use this property to define additional HTML tags in the <head> section
protected static java.lang.String HTML_OPEN
          the standard opening html tag for XHTML documents
protected  java.util.Vector hyperlinkListeners
          the hyperlink listeners
protected  boolean includeDefaultFontStyle
          set this property to true to include a CSS definition for the BODY tag, and to reduce the document size
protected  boolean includeDocType
          set this property to true if you want to include the DOCTYPE tag in the first line of the XHTML document
Note that some browsers will check the document for valid XHTML if the DOCTYPE tag is included.
protected  boolean includeXMLDeclaration
          set this property to true to include the XML declaration line at the top of the document
protected  boolean isDebugging
          set this property to true to generate a debugging document.
protected  short logLevel
          use this property to set the log level
protected  java.util.Vector logListeners
          the logging listeners
protected  java.lang.String metaAuthor
          use this property to define the Meta tag for the author name
protected  java.lang.String metaContentType
          use this property to define the Meta tag for the content type
protected  java.lang.String metaDate
          use this property to define the Meta tag for the date manually
protected  boolean metaDateAuto
          use this property to define an automatic date tag
protected  java.lang.String metaDescription
          use this property to define the Meta tag for the description
protected  boolean metaGenerator
          use this property to define an automatic generator tag
protected  java.lang.String metaKeywords
          use this property to define the Meta tag for keywords
protected  java.lang.String metaTags
          use this property to define additional Meta tags
protected  de.betabeans.scroogexhtml.ScroogeXHTMLParser parser
          the parser object
protected  int processed
          this read only property contains the number of processed bytes
protected  boolean processFontstyle
          reserved for optimization
protected  java.util.Vector progressListeners
          the progress listeners
protected  de.betabeans.scroogexhtml.ScroogeXHTMLReader reader
          the reader object
protected  java.util.Properties replaceFonts
          Use this property to define font names which need to be replaced.
protected static java.lang.String SCROOGEXHTML_NAME
          Bean Name
protected static java.lang.String SCROOGEXHTML_VERSION
          Bean Version
protected  boolean showMessages
          Deprecated.  
protected  java.lang.String styleSheetInclude
          use this property to define embedded style sheets
protected  java.lang.String styleSheetLink
          use this property to link to an external style sheet
protected  de.betabeans.scroogexhtml.ScroogeXHTMLWriter writer
          the writer object
protected  boolean xhtmlStrict
          set this property to true to generate XHTML 1.0 Strict
protected static java.lang.String XML_DECLARATION
          the XML declaration
 
Constructor Summary
ScroogeXHTMLBase()
           
 
Method Summary
 void addAfterTextConversionListener(AfterTextConversionListener listener)
          Adds an AfterTextConversion listener
 void addHyperlinkListener(HyperlinkListener listener)
          Adds a feature to the HyperlinkListener attribute of the ScroogeXHTMLBase object
 void addLogListener(LogListener listener)
          Adds a feature to the LogListener attribute of the ScroogeXHTMLBase object
 void addProgressListener(ProgressListener listener)
          Adds a feature to the ProgressListener attribute of the ScroogeXHTMLBase object
protected  void debug(java.lang.String color, char debugChar)
          write debug string
protected  void debug(java.lang.String color, java.lang.String debugText)
          This methods writes a debug string to the output document.
 boolean getAbortConversion()
          Gets the abortConversion attribute of the ScroogeXHTMLBase object
 boolean getAddOuterHTML()
          Gets the addOuterHTML attribute of the ScroogeXHTMLBase object
 boolean getConvertFontBGColor()
          Gets the convertFontBGColor attribute of the ScroogeXHTMLBase object
 boolean getConvertFontColor()
          Gets the convertFontColor attribute of the ScroogeXHTMLBase object
 boolean getConvertFontHLColor()
          Gets the convertFontHLColor attribute of the ScroogeXHTMLBase object
 boolean getConvertFontName()
          Gets the convertFontName attribute of the ScroogeXHTMLBase object
 boolean getConvertFontSize()
          Gets the convertFontSize attribute of the ScroogeXHTMLBase object
 boolean getConvertFontStyle()
          Gets the convertFontStyle attribute of the ScroogeXHTMLBase object
 boolean getConvertHyperlinks()
          Gets the convertHyperlinks attribute of the ScroogeXHTMLBase object
 boolean getConvertSpaces()
          Gets the convertSpaces attribute of the ScroogeXHTMLBase object
 java.lang.String getDefaultFontColor()
          Gets the defaultFontColor attribute of the ScroogeXHTMLBase object
 java.lang.String getDefaultFontName()
          Gets the defaultFontName attribute of the ScroogeXHTMLBase object
 int getDefaultFontSize()
          Gets the defaultFontSize attribute of the ScroogeXHTMLBase object
protected  java.lang.String getDefaultFontStyleDefinition()
          Gets the defaultFontStyleDefinition attribute of the ScroogeXHTMLBase object
 java.lang.String getDocumentTitle()
          Gets the documentTitle attribute of the ScroogeXHTMLBase object
 java.lang.String getHeadTags()
          Gets the headTags attribute of the ScroogeXHTMLBase object
 boolean getIncludeDefaultFontStyle()
          Gets the includeDefaultFontStyle attribute of the ScroogeXHTMLBase object
 boolean getIncludeDocType()
          Gets the includeDocType attribute of the ScroogeXHTMLBase object
 boolean getIncludeXMLDeclaration()
          Gets the includeXMLDeclaration attribute of the ScroogeXHTMLBase object
 short getLogLevel()
          Gets the logLevel attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaAuthor()
          Gets the metaAuthor attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaContentType()
          Gets the metaContentType attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaDate()
          Gets the metaDate attribute of the ScroogeXHTMLBase object
 boolean getMetaDateAuto()
          Gets the metaDateAuto attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaDescription()
          Gets the metaDescription attribute of the ScroogeXHTMLBase object
 boolean getMetaGenerator()
          Gets the metaGenerator attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaKeywords()
          Gets the metaKeywords attribute of the ScroogeXHTMLBase object
 java.lang.String getMetaTags()
          Gets the metaTags attribute of the ScroogeXHTMLBase object
 int getProcessed()
          Gets the processed attribute of the ScroogeXHTMLBase object
 java.util.Properties getReplaceFonts()
          Gets the replaceFonts attribute of the ScroogeXHTMLBase object
 boolean getShowMessages()
          Gets the showMessages attribute of the ScroogeXHTMLBase object
 java.lang.String getStyleSheetInclude()
          Gets the styleSheetInclude attribute of the ScroogeXHTMLBase object
 java.lang.String getStyleSheetLink()
          Gets the styleSheetLink attribute of the ScroogeXHTMLBase object
 java.lang.String getVersion()
          Gets the version attribute of the ScroogeXHTMLBase object
 boolean getXhtmlStrict()
          Gets the xhtmlStrict attribute of the ScroogeXHTMLBase object
 boolean isDebugMode()
          Gets the debugMode attribute of the ScroogeXHTMLBase object
protected  void log(short logLevel, java.lang.String logMessage)
          Send log messages to System.out, System.err and all listeners.
static java.lang.String nameAndVersion()
          Description of the Method
protected  void notifyProgress()
          notify all progress listeners
 void removeAfterTextConversionListener(AfterTextConversionListener listener)
          Remove a AfterTextConversionListener
 void removeHyperlinkListener(HyperlinkListener listener)
          Remove a HyperlinkListener
 void removeLogListener(LogListener listener)
          Remove a LogListener
 void removeProgressListener(ProgressListener listener)
          Remove a ProgressListener
 void setAbortConversion(boolean newValue)
          Sets the abortConversion attribute of the ScroogeXHTMLBase object
 void setAddOuterHTML(boolean newValue)
          Sets the addOuterHTML attribute of the ScroogeXHTMLBase object
 void setConvertFontBGColor(boolean newValue)
          Sets the convertFontBGColor attribute of the ScroogeXHTMLBase object
 void setConvertFontColor(boolean newValue)
          Sets the convertFontColor attribute of the ScroogeXHTMLBase object
 void setConvertFontHLColor(boolean newValue)
          Sets the convertFontHLColor attribute of the ScroogeXHTMLBase object
 void setConvertFontName(boolean newValue)
          Sets the convertFontName attribute of the ScroogeXHTMLBase object
 void setConvertFontSize(boolean newValue)
          Sets the convertFontSize attribute of the ScroogeXHTMLBase object
 void setConvertFontStyle(boolean newValue)
          Sets the convertFontStyle attribute of the ScroogeXHTMLBase object
 void setConvertHyperlinks(boolean newValue)
          Sets the convertHyperlinks attribute of the ScroogeXHTMLBase object
 void setConvertSpaces(boolean newValue)
          Sets the convertSpaces attribute of the ScroogeXHTMLBase object
 void setDebugMode(boolean newValue)
          Sets the debugMode attribute of the ScroogeXHTMLBase object
 void setDefaultFontColor(java.lang.String newValue)
          Sets the defaultFontColor attribute of the ScroogeXHTMLBase object
 void setDefaultFontName(java.lang.String newValue)
          Sets the defaultFontName attribute of the ScroogeXHTMLBase object
 void setDefaultFontSize(int newValue)
          Sets the defaultFontSize attribute of the ScroogeXHTMLBase object
 void setDocumentTitle(java.lang.String newValue)
          Sets the documentTitle attribute of the ScroogeXHTMLBase object
 void setHeadTags(java.lang.String newValue)
          Sets the headTags attribute of the ScroogeXHTMLBase object
 void setIncludeDefaultFontStyle(boolean newValue)
          Sets the includeDefaultFontStyle attribute of the ScroogeXHTMLBase object
 void setIncludeDocType(boolean newValue)
          Sets the includeDocType attribute of the ScroogeXHTMLBase object
 void setIncludeXMLDeclaration(boolean newValue)
          Sets the includeXMLDeclaration attribute of the ScroogeXHTMLBase object
 void setLogLevel(short newValue)
          Sets the logLevel attribute of the ScroogeXHTMLBase object
 void setMetaAuthor(java.lang.String newValue)
          Sets the metaAuthor attribute of the ScroogeXHTMLBase object
 void setMetaContentType(java.lang.String newValue)
          Sets the metaContentType attribute of the ScroogeXHTMLBase object
 void setMetaDate(java.lang.String newValue)
          Sets the metaDate attribute of the ScroogeXHTMLBase object
 void setMetaDateAuto(boolean newValue)
          Sets the metaDateAuto attribute of the ScroogeXHTMLBase object
 void setMetaDescription(java.lang.String newValue)
          Sets the metaDescription attribute of the ScroogeXHTMLBase object
 void setMetaGenerator(boolean newValue)
          Sets the metaGenerator attribute of the ScroogeXHTMLBase object
 void setMetaKeywords(java.lang.String newValue)
          Sets the metaKeywords attribute of the ScroogeXHTMLBase object
 void setMetaTags(java.lang.String newValue)
          Sets the metaTags attribute of the ScroogeXHTMLBase object
 void setReplaceFonts(java.util.Properties newValue)
          Sets the replaceFonts attribute of the ScroogeXHTMLBase object
 void setShowMessages(boolean newValue)
          Sets the showMessages attribute of the ScroogeXHTMLBase object
 void setStyleSheetInclude(java.lang.String newValue)
          Sets the styleSheetInclude attribute of the ScroogeXHTMLBase object
 void setStyleSheetLink(java.lang.String newValue)
          Sets the styleSheetLink attribute of the ScroogeXHTMLBase object
 void setVersion(java.lang.String value)
          Sets the version attribute of the ScroogeXHTMLBase object
 void setXhtmlStrict(boolean newValue)
          Sets the xhtmlStrict attribute of the ScroogeXHTMLBase object
protected  java.lang.String textElementToXHTML(java.lang.String textString, ScroogeXHTMLDocText textElement)
          A ScroogeXHTMLDocText object calls this method to convert itself to XHTML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCTYPE_XHTML_10_TRANSITIONAL

protected static final java.lang.String DOCTYPE_XHTML_10_TRANSITIONAL
XHTML 1.0 Transitional DOCTYPE definition

DOCTYPE_XHTML_10_STRICT

protected static final java.lang.String DOCTYPE_XHTML_10_STRICT
XHTML 1.0 Strict DOCTYPE definition

CONTENT_TYPE_8859_1

protected static final java.lang.String CONTENT_TYPE_8859_1
ISO 8859-1 content type definition

XML_DECLARATION

protected static final java.lang.String XML_DECLARATION
the XML declaration

HTML_OPEN

protected static final java.lang.String HTML_OPEN
the standard opening html tag for XHTML documents

DEFAULT_FONT_COLOR

protected static final java.lang.String DEFAULT_FONT_COLOR
default font color (default: black)

DEFAULT_FONT_NAME

protected static final java.lang.String DEFAULT_FONT_NAME
default font name (default: 'Times,serif')

DEFAULT_FONT_SIZE

protected static final int DEFAULT_FONT_SIZE
default font size (default: 12 pt)

BETABEANS_URL

protected static final java.lang.String BETABEANS_URL
BetaBeans URL

SCROOGEXHTML_NAME

protected static final java.lang.String SCROOGEXHTML_NAME
Bean Name

SCROOGEXHTML_VERSION

protected static final java.lang.String SCROOGEXHTML_VERSION
Bean Version

curFontName

protected java.lang.StringBuffer curFontName
the current font name

curFontType

protected java.lang.String curFontType
the current font type

defaultFontNr

protected int defaultFontNr
the default Font number

curFontNr

protected int curFontNr
the current font number

curFontCSet

protected int curFontCSet
the current font character set

reader

protected de.betabeans.scroogexhtml.ScroogeXHTMLReader reader
the reader object

parser

protected de.betabeans.scroogexhtml.ScroogeXHTMLParser parser
the parser object

writer

protected de.betabeans.scroogexhtml.ScroogeXHTMLWriter writer
the writer object

hyperlinkListeners

protected java.util.Vector hyperlinkListeners
the hyperlink listeners

logListeners

protected java.util.Vector logListeners
the logging listeners

progressListeners

protected java.util.Vector progressListeners
the progress listeners

afterTextConversionListeners

protected java.util.Vector afterTextConversionListeners
the text element listeners. If text listeners have been defined using this ScroogeXHTMLBase.addAfterTextConversionListener(), all text element listener will pass each piece of text to the listener in the afterTextConversion method after it is converted. It is possible to modify the text and / or the text properties there.

processFontstyle

protected boolean processFontstyle
reserved for optimization

abortConversion

protected boolean abortConversion
set this property to true to abort the conversion

addOuterHTML

protected boolean addOuterHTML
set this property to include surrounding opening and closing html and body tags

convertFontBGColor

protected boolean convertFontBGColor
set this property to convert text background colors

convertFontHLColor

protected boolean convertFontHLColor
set this property to convert text highlight colors

convertFontColor

protected boolean convertFontColor
set this property to convert text foreground colors

convertFontName

protected boolean convertFontName
set this property to convert font names

convertFontSize

protected boolean convertFontSize
set this property to convert font sizes

convertFontStyle

protected boolean convertFontStyle
set this property to convert font styles (bold, italic, underline...)

convertHyperlinks

protected boolean convertHyperlinks
set this property to call the hyperlink listeners

convertSpaces

protected boolean convertSpaces
set this property to convert spaces to &nbsp; tags

defaultFontColor

protected java.lang.String defaultFontColor
set this property to the default font color of your RTF document.
This is an optimization option which creates smaller XHTML documents. It is however also neccessary to set the same default color in the XHTML document, for example using a style sheet.
For example, if your document uses only blue text, just define blue (#000ff) as the default font color in the component and in the style sheet. The converter will now only create HTML code for the font color if it is not blue.

defaultFontName

protected java.lang.String defaultFontName
set this property to the default font name of your RTF document.
This is an optimization option which creates smaller XHTML documents. It is however also neccessary to set the same default font name in the XHTML document, for example using a style sheet.
For example, if the RTF document uses almost only the font 'Times', just define 'Times' as the default font name in the bean and also in the style sheet. The converter will now only create HTML code for the font name if it is not 'Times'.

defaultFontSize

protected int defaultFontSize
set this property to the default font size of your RTF document.
This is an optimization option which creates smaller XHTML documents. It is however also neccessary to set the same default size in the XHTML document, for example using a style sheet.
For example, if your document uses only a 10 point font, just define 10 as the default font size in the component and in the style sheet. The converter will now only create HTML code for the font size if it is not 10 pt.

documentTitle

protected java.lang.String documentTitle
set this property to the XHTML document title

headTags

protected java.lang.String headTags
use this property to define additional HTML tags in the <head> section

includeDefaultFontStyle

protected boolean includeDefaultFontStyle
set this property to true to include a CSS definition for the BODY tag, and to reduce the document size

includeDocType

protected boolean includeDocType
set this property to true if you want to include the DOCTYPE tag in the first line of the XHTML document
Note that some browsers will check the document for valid XHTML if the DOCTYPE tag is included. If the document is not 100% valid XHTML, the browser can generate display errors.

includeXMLDeclaration

protected boolean includeXMLDeclaration
set this property to true to include the XML declaration line at the top of the document

isDebugging

protected boolean isDebugging
set this property to true to generate a debugging document.
In debug mode, the HTML code includes all elemens of the RTF document (RTF tokens, control characters...).
Unknown RTF tokens are red
Known RTF tokens are green
Font names and other unprinted text is silver
Document groups are blue
Document text is black

logLevel

protected short logLevel
use this property to set the log level

metaAuthor

protected java.lang.String metaAuthor
use this property to define the Meta tag for the author name

metaDescription

protected java.lang.String metaDescription
use this property to define the Meta tag for the description

metaContentType

protected java.lang.String metaContentType
use this property to define the Meta tag for the content type

metaDateAuto

protected boolean metaDateAuto
use this property to define an automatic date tag

metaDate

protected java.lang.String metaDate
use this property to define the Meta tag for the date manually

metaGenerator

protected boolean metaGenerator
use this property to define an automatic generator tag

metaKeywords

protected java.lang.String metaKeywords
use this property to define the Meta tag for keywords

metaTags

protected java.lang.String metaTags
use this property to define additional Meta tags

processed

protected int processed
this read only property contains the number of processed bytes

replaceFonts

protected java.util.Properties replaceFonts
Use this property to define font names which need to be replaced. Each entry defines a font name in the RTF source which need to be replaced in the HTML output.
This property can be used to make the document more compatible with web browsers.
Example: the line "Times=Times" means that all font names which start with "Times" - for example, "Times New Roman" - will be replaced by the font name "Times".
Default values: "Arial"="Arial,Helvetica,sans-serif"
"Courier"="Courier,monospace"
"Symbol"="Symbol"
"Times"="Times,serif"

showMessages

protected boolean showMessages
Deprecated.  

set this property to false to enable messages on System.out

styleSheetInclude

protected java.lang.String styleSheetInclude
use this property to define embedded style sheets

styleSheetLink

protected java.lang.String styleSheetLink
use this property to link to an external style sheet

xhtmlStrict

protected boolean xhtmlStrict
set this property to true to generate XHTML 1.0 Strict
Constructor Detail

ScroogeXHTMLBase

public ScroogeXHTMLBase()
Method Detail

nameAndVersion

public static final java.lang.String nameAndVersion()
Description of the Method
Returns:
Description of the Returned Value

setShowMessages

public void setShowMessages(boolean newValue)
Sets the showMessages attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new showMessages value

setAbortConversion

public void setAbortConversion(boolean newValue)
Sets the abortConversion attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new abortConversion value

setConvertFontBGColor

public void setConvertFontBGColor(boolean newValue)
Sets the convertFontBGColor attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontBGColor value

setConvertFontHLColor

public void setConvertFontHLColor(boolean newValue)
Sets the convertFontHLColor attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontHLColor value

setConvertFontColor

public void setConvertFontColor(boolean newValue)
Sets the convertFontColor attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontColor value

setConvertFontName

public void setConvertFontName(boolean newValue)
Sets the convertFontName attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontName value

setConvertFontSize

public void setConvertFontSize(boolean newValue)
Sets the convertFontSize attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontSize value

setConvertFontStyle

public void setConvertFontStyle(boolean newValue)
Sets the convertFontStyle attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertFontStyle value

setConvertHyperlinks

public void setConvertHyperlinks(boolean newValue)
Sets the convertHyperlinks attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertHyperlinks value

setConvertSpaces

public void setConvertSpaces(boolean newValue)
Sets the convertSpaces attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new convertSpaces value

setAddOuterHTML

public void setAddOuterHTML(boolean newValue)
Sets the addOuterHTML attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new addOuterHTML value

setDebugMode

public void setDebugMode(boolean newValue)
Sets the debugMode attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new debugMode value

setDefaultFontColor

public void setDefaultFontColor(java.lang.String newValue)
Sets the defaultFontColor attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new defaultFontColor value

setDefaultFontName

public void setDefaultFontName(java.lang.String newValue)
Sets the defaultFontName attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new defaultFontName value

setDefaultFontSize

public void setDefaultFontSize(int newValue)
Sets the defaultFontSize attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new defaultFontSize value

setDocumentTitle

public void setDocumentTitle(java.lang.String newValue)
Sets the documentTitle attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new documentTitle value

setHeadTags

public void setHeadTags(java.lang.String newValue)
Sets the headTags attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new headTags value

setIncludeXMLDeclaration

public void setIncludeXMLDeclaration(boolean newValue)
Sets the includeXMLDeclaration attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new includeXMLDeclaration value

setIncludeDocType

public void setIncludeDocType(boolean newValue)
Sets the includeDocType attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new includeDocType value

setMetaAuthor

public void setMetaAuthor(java.lang.String newValue)
Sets the metaAuthor attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaAuthor value

setMetaContentType

public void setMetaContentType(java.lang.String newValue)
Sets the metaContentType attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaContentType value

setMetaDateAuto

public void setMetaDateAuto(boolean newValue)
Sets the metaDateAuto attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaDateAuto value

setMetaDescription

public void setMetaDescription(java.lang.String newValue)
Sets the metaDescription attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaDescription value

setMetaGenerator

public void setMetaGenerator(boolean newValue)
Sets the metaGenerator attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaGenerator value

setMetaKeywords

public void setMetaKeywords(java.lang.String newValue)
Sets the metaKeywords attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaKeywords value

setMetaTags

public void setMetaTags(java.lang.String newValue)
Sets the metaTags attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaTags value

setReplaceFonts

public void setReplaceFonts(java.util.Properties newValue)
Sets the replaceFonts attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new replaceFonts value

setStyleSheetLink

public void setStyleSheetLink(java.lang.String newValue)
Sets the styleSheetLink attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new styleSheetLink value

setStyleSheetInclude

public void setStyleSheetInclude(java.lang.String newValue)
Sets the styleSheetInclude attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new styleSheetInclude value

setIncludeDefaultFontStyle

public void setIncludeDefaultFontStyle(boolean newValue)
Sets the includeDefaultFontStyle attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new includeDefaultFontStyle value

setMetaDate

public void setMetaDate(java.lang.String newValue)
Sets the metaDate attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new metaDate value

setXhtmlStrict

public void setXhtmlStrict(boolean newValue)
Sets the xhtmlStrict attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new xhtmlStrict value

setLogLevel

public void setLogLevel(short newValue)
Sets the logLevel attribute of the ScroogeXHTMLBase object
Parameters:
newValue - The new logLevel value

setVersion

public void setVersion(java.lang.String value)
Sets the version attribute of the ScroogeXHTMLBase object
Parameters:
value - The new version value

getShowMessages

public boolean getShowMessages()
Gets the showMessages attribute of the ScroogeXHTMLBase object
Returns:
The showMessages value

getAbortConversion

public boolean getAbortConversion()
Gets the abortConversion attribute of the ScroogeXHTMLBase object
Returns:
The abortConversion value

getConvertHyperlinks

public boolean getConvertHyperlinks()
Gets the convertHyperlinks attribute of the ScroogeXHTMLBase object
Returns:
The convertHyperlinks value

getConvertFontBGColor

public boolean getConvertFontBGColor()
Gets the convertFontBGColor attribute of the ScroogeXHTMLBase object
Returns:
The convertFontBGColor value

getVersion

public java.lang.String getVersion()
Gets the version attribute of the ScroogeXHTMLBase object
Returns:
The version value

getConvertFontHLColor

public boolean getConvertFontHLColor()
Gets the convertFontHLColor attribute of the ScroogeXHTMLBase object
Returns:
The convertFontHLColor value

getLogLevel

public short getLogLevel()
Gets the logLevel attribute of the ScroogeXHTMLBase object
Returns:
The logLevel value

getConvertFontColor

public boolean getConvertFontColor()
Gets the convertFontColor attribute of the ScroogeXHTMLBase object
Returns:
The convertFontColor value

getConvertFontName

public boolean getConvertFontName()
Gets the convertFontName attribute of the ScroogeXHTMLBase object
Returns:
The convertFontName value

getConvertFontSize

public boolean getConvertFontSize()
Gets the convertFontSize attribute of the ScroogeXHTMLBase object
Returns:
The convertFontSize value

getConvertFontStyle

public boolean getConvertFontStyle()
Gets the convertFontStyle attribute of the ScroogeXHTMLBase object
Returns:
The convertFontStyle value

getConvertSpaces

public boolean getConvertSpaces()
Gets the convertSpaces attribute of the ScroogeXHTMLBase object
Returns:
The convertSpaces value

getAddOuterHTML

public boolean getAddOuterHTML()
Gets the addOuterHTML attribute of the ScroogeXHTMLBase object
Returns:
The addOuterHTML value

isDebugMode

public boolean isDebugMode()
Gets the debugMode attribute of the ScroogeXHTMLBase object
Returns:
The debugMode value

getDefaultFontColor

public java.lang.String getDefaultFontColor()
Gets the defaultFontColor attribute of the ScroogeXHTMLBase object
Returns:
The defaultFontColor value

getDefaultFontName

public java.lang.String getDefaultFontName()
Gets the defaultFontName attribute of the ScroogeXHTMLBase object
Returns:
The defaultFontName value

getIncludeDefaultFontStyle

public boolean getIncludeDefaultFontStyle()
Gets the includeDefaultFontStyle attribute of the ScroogeXHTMLBase object
Returns:
The includeDefaultFontStyle value

getDefaultFontSize

public int getDefaultFontSize()
Gets the defaultFontSize attribute of the ScroogeXHTMLBase object
Returns:
The defaultFontSize value

getHeadTags

public java.lang.String getHeadTags()
Gets the headTags attribute of the ScroogeXHTMLBase object
Returns:
The headTags value

getIncludeDocType

public boolean getIncludeDocType()
Gets the includeDocType attribute of the ScroogeXHTMLBase object
Returns:
The includeDocType value

getIncludeXMLDeclaration

public boolean getIncludeXMLDeclaration()
Gets the includeXMLDeclaration attribute of the ScroogeXHTMLBase object
Returns:
The includeXMLDeclaration value

getMetaAuthor

public java.lang.String getMetaAuthor()
Gets the metaAuthor attribute of the ScroogeXHTMLBase object
Returns:
The metaAuthor value

getMetaContentType

public java.lang.String getMetaContentType()
Gets the metaContentType attribute of the ScroogeXHTMLBase object
Returns:
The metaContentType value

getMetaDateAuto

public boolean getMetaDateAuto()
Gets the metaDateAuto attribute of the ScroogeXHTMLBase object
Returns:
The metaDateAuto value

getMetaDate

public java.lang.String getMetaDate()
Gets the metaDate attribute of the ScroogeXHTMLBase object
Returns:
The metaDate value

getMetaDescription

public java.lang.String getMetaDescription()
Gets the metaDescription attribute of the ScroogeXHTMLBase object
Returns:
The metaDescription value

getMetaGenerator

public boolean getMetaGenerator()
Gets the metaGenerator attribute of the ScroogeXHTMLBase object
Returns:
The metaGenerator value

getMetaKeywords

public java.lang.String getMetaKeywords()
Gets the metaKeywords attribute of the ScroogeXHTMLBase object
Returns:
The metaKeywords value

getMetaTags

public java.lang.String getMetaTags()
Gets the metaTags attribute of the ScroogeXHTMLBase object
Returns:
The metaTags value

getReplaceFonts

public java.util.Properties getReplaceFonts()
Gets the replaceFonts attribute of the ScroogeXHTMLBase object
Returns:
The replaceFonts value

getStyleSheetLink

public java.lang.String getStyleSheetLink()
Gets the styleSheetLink attribute of the ScroogeXHTMLBase object
Returns:
The styleSheetLink value

getStyleSheetInclude

public java.lang.String getStyleSheetInclude()
Gets the styleSheetInclude attribute of the ScroogeXHTMLBase object
Returns:
The styleSheetInclude value

getXhtmlStrict

public boolean getXhtmlStrict()
Gets the xhtmlStrict attribute of the ScroogeXHTMLBase object
Returns:
The xhtmlStrict value

getDocumentTitle

public java.lang.String getDocumentTitle()
Gets the documentTitle attribute of the ScroogeXHTMLBase object
Returns:
The documentTitle value

getProcessed

public int getProcessed()
Gets the processed attribute of the ScroogeXHTMLBase object
Returns:
The processed value

addProgressListener

public void addProgressListener(ProgressListener listener)
Adds a feature to the ProgressListener attribute of the ScroogeXHTMLBase object
Parameters:
listener - The feature to be added to the ProgressListener attribute

addLogListener

public void addLogListener(LogListener listener)
Adds a feature to the LogListener attribute of the ScroogeXHTMLBase object
Parameters:
listener - The feature to be added to the LogListener attribute

removeProgressListener

public void removeProgressListener(ProgressListener listener)
Remove a ProgressListener
Parameters:
listener - Description of Parameter

removeLogListener

public void removeLogListener(LogListener listener)
Remove a LogListener
Parameters:
listener - Description of Parameter

addHyperlinkListener

public void addHyperlinkListener(HyperlinkListener listener)
Adds a feature to the HyperlinkListener attribute of the ScroogeXHTMLBase object
Parameters:
listener - The feature to be added to the HyperlinkListener attribute

removeHyperlinkListener

public void removeHyperlinkListener(HyperlinkListener listener)
Remove a HyperlinkListener
Parameters:
listener - Description of Parameter

addAfterTextConversionListener

public void addAfterTextConversionListener(AfterTextConversionListener listener)
Adds an AfterTextConversion listener
Parameters:
listener - The listener to be added to the AfterTextConversionListener attribute

removeAfterTextConversionListener

public void removeAfterTextConversionListener(AfterTextConversionListener listener)
Remove a AfterTextConversionListener
Parameters:
listener - Description of Parameter

getDefaultFontStyleDefinition

protected java.lang.String getDefaultFontStyleDefinition()
Gets the defaultFontStyleDefinition attribute of the ScroogeXHTMLBase object
Returns:
The defaultFontStyleDefinition value

debug

protected void debug(java.lang.String color,
                     java.lang.String debugText)
This methods writes a debug string to the output document. The color of the string is defined as text (for example "green").
Parameters:
color - the debug string color
debugText - Description of Parameter

debug

protected void debug(java.lang.String color,
                     char debugChar)
write debug string
Parameters:
color - the debug string color
debugChar - the debugging information

notifyProgress

protected void notifyProgress()
notify all progress listeners

textElementToXHTML

protected java.lang.String textElementToXHTML(java.lang.String textString,
                                              ScroogeXHTMLDocText textElement)
A ScroogeXHTMLDocText object calls this method to convert itself to XHTML.
Parameters:
textString - Description of Parameter
textElement - Description of Parameter
Returns:
the XHTML representation of the text

log

protected void log(short logLevel,
                   java.lang.String logMessage)
Send log messages to System.out, System.err and all listeners.
Parameters:
logLevel - the log level
logMessage - the log message