Class ScroogeXHTMLBase
- All Implemented Interfaces:
ConversionConfiguration
,Serializable
- Direct Known Subclasses:
ScroogeXHTMLMain
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPostProcessListener
(PostProcessListener listener) Adds a post-process listener.This property contains the default font color.This property contains the default font name.int
This property contains the default font size.This property contains the default language.This property contains the output document type.This property contains the font size unit.int
This property contains the number of blanks in the output indentation.Retrieves the invalid RTF header action.static String
getName()
Returns the name of the software.This property contains the list of post-process listeners.This property contains the tab string.static String
Retrieves the version of the software.boolean
Returns true if the conversion will enclose the generated markup.boolean
boolean
This property controls the conversion of bookmarks.boolean
This property controls the conversion of empty paragraphs to linebreaks.boolean
boolean
boolean
boolean
boolean
boolean
boolean
This property controls the conversion of footnotes.boolean
This property controls the conversion of hyperlinks.boolean
boolean
boolean
boolean
This property controls the conversion of pictures.boolean
This property controls the conversion of tables.boolean
If this property is set to true, the HTML head section will include a CSS definition for the default font style.void
removePostProcessListener
(PostProcessListener listener) Removes a post-process listener.void
setAddOuterHTML
(boolean newValue) Enables embedding the generated markup in a stand-alone document.void
setConvertBookmarks
(boolean newValue) Set this property to true to activate bookmark conversion.void
setConvertEmptyParagraphs
(boolean newValue) Enable conversion of empty paragraphs to line break tags(<br />)
.void
setConvertFootnotes
(boolean newValue) Set this property to true to enable conversion of footnotes.void
setConvertHyperlinks
(boolean newValue) Enable conversion of hyperlinks.void
setConvertPictures
(boolean newValue) Set this property to true to processing of picture data.void
setConvertTables
(boolean newValue) Set this property to true to enable table conversion.void
setDefaultFontColor
(String newValue) Use this property to optimize the HTML code generation.void
setDefaultFontName
(String newValue) Use this property to optimize the HTML code generation.void
setDefaultFontSize
(int newValue) Use this property to optimize the HTML code generation.void
setDefaultLanguage
(String newValue) Set the default language code.void
setDocumentType
(DocumentType newValue) Sets the documentType property.void
setFontReplacing
(FontReplacing fontReplacing) Sets the FontReplacing object.void
setIndentAmount
(int newValue) This property specifies the indentation level.void
Sets the action to be taken when an invalid RTF header is encountered.void
setPictureAdapter
(PictureAdapter newValue) Set the picture adapter.void
setTabString
(String newValue) String which will be used to replace a \\tab token.
-
Field Details
-
NBSP
NON_BREAKING_SPACE - non-breaking space. -
NBSPS
String constant for non-breaking spaces.This constant represents two non-breaking spaces (" "). Non-breaking spaces are used to insert whitespace that will not be collapsed or trimmed by the browser when rendering HTML content.
- See Also:
-
-
Constructor Details
-
ScroogeXHTMLBase
public ScroogeXHTMLBase()
-
-
Method Details
-
getName
Returns the name of the software.- Returns:
- the name of the software.
-
addPostProcessListener
Adds a post-process listener.The converter executes post-process listeners in the order they have been added. The converter creates and adds no post-process handlers by default (on creation). Note: post-processing may lead to a significant increase of conversion time.
- Parameters:
listener
- the post-process listener
-
removePostProcessListener
Removes a post-process listener.- Parameters:
listener
- the post-process listener
-
setAddOuterHTML
public void setAddOuterHTML(boolean newValue) Enables embedding the generated markup in a stand-alone document.Set this property to true to include the HTML header section, and place the generated HTML between the <body> and </body> tags. This allows to create 'stand-alone' HTML output documents.
- Parameters:
newValue
- The new addOuterHTML value- See Also:
- Default value:
- false
-
setConvertBookmarks
public void setConvertBookmarks(boolean newValue) Set this property to true to activate bookmark conversion.- Parameters:
newValue
- the new convertBookmarks value- See Also:
- Default value:
- false
-
setConvertEmptyParagraphs
public void setConvertEmptyParagraphs(boolean newValue) Enable conversion of empty paragraphs to line break tags(<br />)
.- Parameters:
newValue
- The new convertEmptyParagraphs value- See Also:
- Default value:
- false
-
setConvertFootnotes
public void setConvertFootnotes(boolean newValue) Set this property to true to enable conversion of footnotes.- Parameters:
newValue
- The new convertFootnotes value- See Also:
- Default value:
- false
-
setConvertHyperlinks
public void setConvertHyperlinks(boolean newValue) Enable conversion of hyperlinks.- Parameters:
newValue
- The new convertHyperlinks value- See Also:
- Default value:
- false
-
setConvertPictures
public void setConvertPictures(boolean newValue) Set this property to true to processing of picture data.- Parameters:
newValue
- The new convertPictures value- See Also:
- Default value:
- false
-
setConvertTables
public void setConvertTables(boolean newValue) Set this property to true to enable table conversion.- Parameters:
newValue
- The new convertTables value- See Also:
- Default value:
- false
-
setDefaultFontColor
Use this property to optimize the HTML code generation.For example, if most of the document uses black text, define black (#000000) as the default font color in the component and in the style sheet. The converter will now only create a font color attribute if the text color is not black. Note: only effective if
IncludeDefaultFontStyle
is set to true.- Parameters:
newValue
- The new defaultFontColor value- See Also:
- Default value:
DEF_FONT_COLOR
-
setDefaultFontName
Use this property to optimize the HTML code generation.For example, if most of the document uses the font 'Times', define it as the default font name in the component and in the style sheet. The converter will now only create a font name attribute if it is not 'Times'. Note: only effective if
IncludeDefaultFontStyle
is set to true.- Parameters:
newValue
- The new defaultFontName value- See Also:
- Default value:
DEF_FONT_NAME
-
setDefaultFontSize
public void setDefaultFontSize(int newValue) Use this property to optimize the HTML code generation.For example, if most of the document uses a 10-point font, define 10 as the default font size in the component and in the style sheet. The converter will now only create a font size attribute if it is not 10 pt. Note: only effective if
IncludeDefaultFontStyle
is set to true.- Parameters:
newValue
- The new defaultFontSize value- See Also:
- Default value:
DEF_FONT_SIZE
-
setDefaultLanguage
Set the default language code.- Parameters:
newValue
- the new defaultLanguage value.- See Also:
- Default value:
- empty
-
setDocumentType
Sets the documentType property.- Parameters:
newValue
- the new documentType value- See Also:
-
setFontReplacing
Sets the FontReplacing object.- Parameters:
fontReplacing
- the new FontReplacing value.
-
setIndentAmount
public void setIndentAmount(int newValue) This property specifies the indentation level.- Parameters:
newValue
- the new indentAmount value- See Also:
- Default value:
- 2
-
setInvalidRtfHeaderAction
Sets the action to be taken when an invalid RTF header is encountered.- Parameters:
newValue
- the action to be taken
-
setPictureAdapter
Set the picture adapter.- Parameters:
newValue
- the new pictureAdapter value- See Also:
-
setTabString
String which will be used to replace a \\tab token.- Parameters:
newValue
- The new tabString- See Also:
- Default value:
- A sequence of eight non-breaking space characters (nbsp)
-
isAddOuterHTML
public boolean isAddOuterHTML()Description copied from interface:ConversionConfiguration
Returns true if the conversion will enclose the generated markup.- Specified by:
isAddOuterHTML
in interfaceConversionConfiguration
- Returns:
- true if the conversion will enclose the generated markup.
-
isConvertBookmarks
public boolean isConvertBookmarks()Description copied from interface:ConversionConfiguration
This property controls the conversion of bookmarks.- Specified by:
isConvertBookmarks
in interfaceConversionConfiguration
- Returns:
- true if the conversion of bookmarks is enabled.
-
isConvertEmptyParagraphs
public boolean isConvertEmptyParagraphs()Description copied from interface:ConversionConfiguration
This property controls the conversion of empty paragraphs to linebreaks. If enabled, the result markup will contain <br> or <br /> instead of empty <p> elements.- Specified by:
isConvertEmptyParagraphs
in interfaceConversionConfiguration
- Returns:
- true if the conversion of bookmarks to linebreaks is enabled.
-
isConvertFootnotes
public boolean isConvertFootnotes()Description copied from interface:ConversionConfiguration
This property controls the conversion of footnotes.- Specified by:
isConvertFootnotes
in interfaceConversionConfiguration
- Returns:
- true if the conversion of footnotes is enabled.
-
isConvertHyperlinks
public boolean isConvertHyperlinks()Description copied from interface:ConversionConfiguration
This property controls the conversion of hyperlinks.- Specified by:
isConvertHyperlinks
in interfaceConversionConfiguration
- Returns:
- true if the conversion of hyperlinks is enabled.
-
isConvertPictures
public boolean isConvertPictures()Description copied from interface:ConversionConfiguration
This property controls the conversion of pictures.- Specified by:
isConvertPictures
in interfaceConversionConfiguration
- Returns:
- true if the conversion of pictures is enabled.
-
isConvertTables
public boolean isConvertTables()Description copied from interface:ConversionConfiguration
This property controls the conversion of tables.- Specified by:
isConvertTables
in interfaceConversionConfiguration
- Returns:
- true if the conversion of tables is enabled.
-
getDefaultFontColor
Description copied from interface:ConversionConfiguration
This property contains the default font color.- Specified by:
getDefaultFontColor
in interfaceConversionConfiguration
- Returns:
- the default font color.
-
getDefaultFontName
Description copied from interface:ConversionConfiguration
This property contains the default font name.- Specified by:
getDefaultFontName
in interfaceConversionConfiguration
- Returns:
- the default font name.
-
getDefaultFontSize
public int getDefaultFontSize()Description copied from interface:ConversionConfiguration
This property contains the default font size.- Specified by:
getDefaultFontSize
in interfaceConversionConfiguration
- Returns:
- the default font size.
-
getDefaultLanguage
Description copied from interface:ConversionConfiguration
This property contains the default language.- Specified by:
getDefaultLanguage
in interfaceConversionConfiguration
- Returns:
- the default language.
-
getDocumentType
Description copied from interface:ConversionConfiguration
This property contains the output document type.- Specified by:
getDocumentType
in interfaceConversionConfiguration
- Returns:
- the output document type.
-
getFontReplacing
-
getFontSizeUnit
Description copied from interface:ConversionConfiguration
This property contains the font size unit.- Specified by:
getFontSizeUnit
in interfaceConversionConfiguration
- Returns:
- the font size unit.
-
isIncludeDefaultFontStyle
public boolean isIncludeDefaultFontStyle()Description copied from interface:ConversionConfiguration
If this property is set to true, the HTML head section will include a CSS definition for the default font style.- Specified by:
isIncludeDefaultFontStyle
in interfaceConversionConfiguration
- Returns:
- true if the CSS definition for the default font style will be included.
-
getIndentAmount
public int getIndentAmount()Description copied from interface:ConversionConfiguration
This property contains the number of blanks in the output indentation.- Specified by:
getIndentAmount
in interfaceConversionConfiguration
- Returns:
- the number of blanks in the output indentation.
-
getInvalidRtfHeaderAction
Retrieves the invalid RTF header action.- Returns:
- The invalid RTF header action.
-
getPictureAdapter
-
getPostProcessListeners
Description copied from interface:ConversionConfiguration
This property contains the list of post-process listeners. The returned list is unmodifiable.- Specified by:
getPostProcessListeners
in interfaceConversionConfiguration
- Returns:
- the list of post-process listeners.
-
getTabString
Description copied from interface:ConversionConfiguration
This property contains the tab string.- Specified by:
getTabString
in interfaceConversionConfiguration
- Returns:
- the tab string.
-
getVersion
Retrieves the version of the software.- Returns:
- the version of the application as a String.
-
getCharPropConvConfig
- Returns:
- the configuration bean for character conversion options.
-
getParaPropConvConfig
- Returns:
- the configuration bean for paragraph conversion options.
-
getTablePropConvConfig
- Returns:
- the configuration bean for table property conversion options.
-
getHtmlHeadConfig
- Returns:
- the configuration bean for HTML head section options.
-
getListConversionConfig
- Returns:
- the configuration bean for list section processing.
-
isConvertFontBGColor
public boolean isConvertFontBGColor()- Specified by:
isConvertFontBGColor
in interfaceConversionConfiguration
-
isConvertFontColor
public boolean isConvertFontColor()- Specified by:
isConvertFontColor
in interfaceConversionConfiguration
-
isConvertFontHLColor
public boolean isConvertFontHLColor()- Specified by:
isConvertFontHLColor
in interfaceConversionConfiguration
-
isConvertFontName
public boolean isConvertFontName()- Specified by:
isConvertFontName
in interfaceConversionConfiguration
-
isConvertFontSize
public boolean isConvertFontSize()- Specified by:
isConvertFontSize
in interfaceConversionConfiguration
-
isConvertFontStyle
public boolean isConvertFontStyle()- Specified by:
isConvertFontStyle
in interfaceConversionConfiguration
-
isConvertLanguage
public boolean isConvertLanguage()- Specified by:
isConvertLanguage
in interfaceConversionConfiguration
-
isConvertAlignment
public boolean isConvertAlignment()- Specified by:
isConvertAlignment
in interfaceConversionConfiguration
-
isConvertIndent
public boolean isConvertIndent()- Specified by:
isConvertIndent
in interfaceConversionConfiguration
-
isConvertParagraphMargins
public boolean isConvertParagraphMargins()- Specified by:
isConvertParagraphMargins
in interfaceConversionConfiguration
-