fr.opensagres.xdocreport.document.odt.textstyling
Class ODTDefaultStylesGenerator
java.lang.Object
fr.opensagres.xdocreport.document.odt.textstyling.ODTDefaultStylesGenerator
- All Implemented Interfaces:
- IODTStylesGenerator, IStylesGenerator<ODTDefaultStyle>
public class ODTDefaultStylesGenerator
- extends Object
- implements IODTStylesGenerator
Default implementation : - uses OOo default styles for headers - uses default but renamed styles for others
- Author:
- Tiry
Constructor Summary |
ODTDefaultStylesGenerator()
protected static String[] HEADING_STYLES = new String[] {
""
,
""
,
""
,
""
,
""
,
""
}; |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEADER_PREFIX
protected static final String HEADER_PREFIX
- See Also:
- Constant Field Values
BULLET_CHARS
protected static final String[] BULLET_CHARS
OL_STYLE_NAME
protected static final String OL_STYLE_NAME
- See Also:
- Constant Field Values
UL_STYLE_NAME
protected static final String UL_STYLE_NAME
- See Also:
- Constant Field Values
LIST_P_STYLE_NAME_SUFFIX
protected static final String LIST_P_STYLE_NAME_SUFFIX
- See Also:
- Constant Field Values
BULLET_STEP
protected static final double BULLET_STEP
- See Also:
- Constant Field Values
BOLD_STYLE_NAME
protected static final String BOLD_STYLE_NAME
- See Also:
- Constant Field Values
ITALIC_STYLE_NAME
protected static final String ITALIC_STYLE_NAME
- See Also:
- Constant Field Values
UNDERLINE_STYLE_NAME
protected static final String UNDERLINE_STYLE_NAME
- See Also:
- Constant Field Values
STRIKE_STYLE_NAME
protected static final String STRIKE_STYLE_NAME
- See Also:
- Constant Field Values
SUBSCRIPT_STYLE_NAME
protected static final String SUBSCRIPT_STYLE_NAME
- See Also:
- Constant Field Values
SUPERSCRIPT_STYLE_NAME
protected static final String SUPERSCRIPT_STYLE_NAME
- See Also:
- Constant Field Values
PAGE_BREAK_BEFORE_PARAGRAPH_STYLE_NAME
protected static final String PAGE_BREAK_BEFORE_PARAGRAPH_STYLE_NAME
- See Also:
- Constant Field Values
PAGE_BREAK_AFTER_PARAGRAPH_STYLE_NAME
protected static final String PAGE_BREAK_AFTER_PARAGRAPH_STYLE_NAME
- See Also:
- Constant Field Values
TITLE_FONT_SIZE
protected static String[] TITLE_FONT_SIZE
ODTDefaultStylesGenerator
public ODTDefaultStylesGenerator()
- protected static String[] HEADING_STYLES = new String[] {
""
,
""
,
""
,
""
,
""
,
""
};
getBulletChar
protected String getBulletChar(int level)
getHeaderStyleName
public String getHeaderStyleName(int level)
- Specified by:
getHeaderStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style for a given header level
generateHeaderStyle
public String generateHeaderStyle(int level)
- Specified by:
generateHeaderStyle
in interface IODTStylesGenerator
- Returns:
- header style declaration for a given level
generateTextStyles
public String generateTextStyles()
- Specified by:
generateTextStyles
in interface IODTStylesGenerator
- Returns:
- the style declaration for Blod, italic ...
generateParagraphStyles
public String generateParagraphStyles()
- Description copied from interface:
IODTStylesGenerator
- Returns the paragraph styles for page break.
- Specified by:
generateParagraphStyles
in interface IODTStylesGenerator
- Returns:
generateListStyle
public String generateListStyle()
- Specified by:
generateListStyle
in interface IODTStylesGenerator
- Returns:
- the style definition for lists (both ul and ol)
generateListStyle
protected String generateListStyle(boolean ordered)
generateBulletStyle
protected String generateBulletStyle(Integer level,
boolean ordered)
getHeaderStylesCount
public int getHeaderStylesCount()
- Specified by:
getHeaderStylesCount
in interface IODTStylesGenerator
- Returns:
- number of available header styles
getHeaderStyleNameLevel
public int getHeaderStyleNameLevel(String styleName)
- Specified by:
getHeaderStyleNameLevel
in interface IODTStylesGenerator
- Returns:
- the level of the header associated to this style (-1 if this is not a header style)
getOLStyleName
public String getOLStyleName()
- Specified by:
getOLStyleName
in interface IODTStylesGenerator
- Returns:
- style name for Ordered Lists
getULStyleName
public String getULStyleName()
- Specified by:
getULStyleName
in interface IODTStylesGenerator
- Returns:
- style name for unordered Lists
getListItemParagraphStyleNameSuffix
public String getListItemParagraphStyleNameSuffix()
- Specified by:
getListItemParagraphStyleNameSuffix
in interface IODTStylesGenerator
- Returns:
- the suffix used to name the style for list items
getBoldStyleName
public String getBoldStyleName()
- Specified by:
getBoldStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Bold
getItalicStyleName
public String getItalicStyleName()
- Specified by:
getItalicStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Italic
getUnderlineStyleName
public String getUnderlineStyleName()
- Specified by:
getUnderlineStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Underline
getStrikeStyleName
public String getStrikeStyleName()
- Specified by:
getStrikeStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Strike
getSubscriptStyleName
public String getSubscriptStyleName()
- Specified by:
getSubscriptStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Subscript
getSuperscriptStyleName
public String getSuperscriptStyleName()
- Specified by:
getSuperscriptStyleName
in interface IODTStylesGenerator
- Returns:
- the name of the style used for Superscript
getParaBreakBeforeStyleName
public String getParaBreakBeforeStyleName()
- Specified by:
getParaBreakBeforeStyleName
in interface IODTStylesGenerator
getParaBreakAfterStyleName
public String getParaBreakAfterStyleName()
- Specified by:
getParaBreakAfterStyleName
in interface IODTStylesGenerator
generateAllStyles
public String generateAllStyles(ODTDefaultStyle defaultStyle)
- Specified by:
generateAllStyles
in interface IStylesGenerator<ODTDefaultStyle>
getDynamicStyles
public String getDynamicStyles()
- Specified by:
getDynamicStyles
in interface IODTStylesGenerator
getTextStyleName
public String getTextStyleName(ContainerProperties properties)
- Specified by:
getTextStyleName
in interface IODTStylesGenerator
Copyright © 2013. All rights reserved.