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 java.lang.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 java.lang.String HEADER_PREFIX
- See Also:
- Constant Field Values
BULLET_CHARS
protected static final java.lang.String[] BULLET_CHARS
OL_STYLE_NAME
protected static final java.lang.String OL_STYLE_NAME
- See Also:
- Constant Field Values
UL_STYLE_NAME
protected static final java.lang.String UL_STYLE_NAME
- See Also:
- Constant Field Values
LIST_P_STYLE_NAME_SUFFIX
protected static final java.lang.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 java.lang.String BOLD_STYLE_NAME
- See Also:
- Constant Field Values
ITALIC_STYLE_NAME
protected static final java.lang.String ITALIC_STYLE_NAME
- See Also:
- Constant Field Values
UNDERLINE_STYLE_NAME
protected static final java.lang.String UNDERLINE_STYLE_NAME
- See Also:
- Constant Field Values
STRIKE_STYLE_NAME
protected static final java.lang.String STRIKE_STYLE_NAME
- See Also:
- Constant Field Values
SUBSCRIPT_STYLE_NAME
protected static final java.lang.String SUBSCRIPT_STYLE_NAME
- See Also:
- Constant Field Values
SUPERSCRIPT_STYLE_NAME
protected static final java.lang.String SUPERSCRIPT_STYLE_NAME
- See Also:
- Constant Field Values
PAGE_BREAK_BEFORE_PARAGRAPH_STYLE_NAME
protected static final java.lang.String PAGE_BREAK_BEFORE_PARAGRAPH_STYLE_NAME
- See Also:
- Constant Field Values
PAGE_BREAK_AFTER_PARAGRAPH_STYLE_NAME
protected static final java.lang.String PAGE_BREAK_AFTER_PARAGRAPH_STYLE_NAME
- See Also:
- Constant Field Values
EMPTY_TEXT_STYLE_NAME
protected static final java.lang.String EMPTY_TEXT_STYLE_NAME
- See Also:
- Constant Field Values
TITLE_FONT_SIZE
protected static java.lang.String[] TITLE_FONT_SIZE
ODTDefaultStylesGenerator
public ODTDefaultStylesGenerator()
- protected static String[] HEADING_STYLES = new String[] {
""
,
""
,
""
,
""
,
""
,
""
};
getBulletChar
protected java.lang.String getBulletChar(int level)
getHeaderStyleName
public java.lang.String getHeaderStyleName(int level)
- Specified by:
getHeaderStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style for a given header level
generateHeaderStyle
public java.lang.String generateHeaderStyle(int level)
- Specified by:
generateHeaderStyle in interface IODTStylesGenerator
- Returns:
- header style declaration for a given level
generateTextStyles
public java.lang.String generateTextStyles()
- Specified by:
generateTextStyles in interface IODTStylesGenerator
- Returns:
- the style declaration for Blod, italic ...
generateParagraphStyles
public java.lang.String generateParagraphStyles()
- Description copied from interface:
IODTStylesGenerator
- Returns the paragraph styles for page break.
- Specified by:
generateParagraphStyles in interface IODTStylesGenerator
- Returns:
generateListStyle
public java.lang.String generateListStyle()
- Specified by:
generateListStyle in interface IODTStylesGenerator
- Returns:
- the style definition for lists (both ul and ol)
generateListStyle
protected java.lang.String generateListStyle(boolean ordered)
generateBulletStyle
protected java.lang.String generateBulletStyle(java.lang.Integer level,
boolean ordered)
getHeaderStylesCount
public int getHeaderStylesCount()
- Specified by:
getHeaderStylesCount in interface IODTStylesGenerator
- Returns:
- number of available header styles
getHeaderStyleNameLevel
public int getHeaderStyleNameLevel(java.lang.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 java.lang.String getOLStyleName()
- Specified by:
getOLStyleName in interface IODTStylesGenerator
- Returns:
- style name for Ordered Lists
getULStyleName
public java.lang.String getULStyleName()
- Specified by:
getULStyleName in interface IODTStylesGenerator
- Returns:
- style name for unordered Lists
getListItemParagraphStyleNameSuffix
public java.lang.String getListItemParagraphStyleNameSuffix()
- Specified by:
getListItemParagraphStyleNameSuffix in interface IODTStylesGenerator
- Returns:
- the suffix used to name the style for list items
getBoldStyleName
public java.lang.String getBoldStyleName()
- Specified by:
getBoldStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Bold
getItalicStyleName
public java.lang.String getItalicStyleName()
- Specified by:
getItalicStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Italic
getUnderlineStyleName
public java.lang.String getUnderlineStyleName()
- Specified by:
getUnderlineStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Underline
getStrikeStyleName
public java.lang.String getStrikeStyleName()
- Specified by:
getStrikeStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Strike
getSubscriptStyleName
public java.lang.String getSubscriptStyleName()
- Specified by:
getSubscriptStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Subscript
getSuperscriptStyleName
public java.lang.String getSuperscriptStyleName()
- Specified by:
getSuperscriptStyleName in interface IODTStylesGenerator
- Returns:
- the name of the style used for Superscript
getParaBreakBeforeStyleName
public java.lang.String getParaBreakBeforeStyleName()
- Specified by:
getParaBreakBeforeStyleName in interface IODTStylesGenerator
getParaBreakAfterStyleName
public java.lang.String getParaBreakAfterStyleName()
- Specified by:
getParaBreakAfterStyleName in interface IODTStylesGenerator
generateAllStyles
public java.lang.String generateAllStyles(ODTDefaultStyle defaultStyle)
- Specified by:
generateAllStyles in interface IStylesGenerator<ODTDefaultStyle>
getDynamicStyles
public java.lang.String getDynamicStyles()
- Specified by:
getDynamicStyles in interface IODTStylesGenerator
getTextStyleName
public java.lang.String getTextStyleName(ContainerProperties properties)
- Specified by:
getTextStyleName in interface IODTStylesGenerator
Copyright © 2014. All Rights Reserved.