public class ParagraphStyleHandler extends DefaultStyleHandler
This class provides functions to handle the font settings, text alignment settings and so on.
isUseDefaultStyle, mDocument, mFamilyProperties, mGraphicProperties, mOdfElement, mStyleElement, mTableCellProperties, mTableProperties, mWritableGraphicProperties, mWritableStyleElement, mWritableTableCellProperties, mWritableTableProperties
Modifier and Type | Method and Description |
---|---|
String |
getCountry(Document.ScriptType type)
Return the country information for a specific script type
The country information in its parent style and default style will be
taken into considered.
|
Font |
getFont(Document.ScriptType type)
Return the font definition for a specific script type.
|
StyleTypeDefinitions.HorizontalAlignmentType |
getHorizontalAlignment()
Return the horizontal alignment.
|
String |
getLanguage(Document.ScriptType type)
Return the language information for a specific script type
The language definition in its parent style and default style will be
taken into considered.
|
void |
setCountry(String country,
Document.ScriptType type)
Set the country information for a specific script type
The consistency between country and script type is not verified.
|
void |
setFont(Font font)
Set the font definition.
|
void |
setFont(Font font,
Locale language)
Set the font definition.
|
void |
setHorizontalAlignment(StyleTypeDefinitions.HorizontalAlignmentType alignType)
Set the horizontal alignment.
|
void |
setLanguage(String language,
Document.ScriptType type)
Set the language information for a specific script type
If the parameter
language is null, the language information
for this script type will be removed. |
getGraphicPropertiesForRead, getGraphicPropertiesForWrite, getParagraphPropertiesForRead, getParagraphPropertiesForWrite, getReadableStyleElementByName, getStyleElementForRead, getStyleElementForWrite, getTableCellPropertiesForRead, getTableCellPropertiesForWrite, getTablePropertiesForRead, getTablePropertiesForWrite, getTextPropertiesForRead, getTextPropertiesForWrite, getUsedStyleName, getWritableStyleElementByName
public String getCountry(Document.ScriptType type)
The country information in its parent style and default style will be taken into considered.
Null will be returned if there is no country information for this script type.
type
- - script typepublic Font getFont(Document.ScriptType type)
The font definition in its parent style and default style will be taken into considered.
A default font definition will be returned if there is no font definition for this script type at all.
type
- - script typepublic String getLanguage(Document.ScriptType type)
The language definition in its parent style and default style will be taken into considered.
Null will be returned if there is no language information for this script type at all.
type
- - script typepublic void setCountry(String country, Document.ScriptType type)
The consistency between country and script type is not verified.
If the parameter country
is null, the country information
for this script type will be removed.
country
- - the country informationtype
- - script typeTextProperties.setCountry(String, Document.ScriptType)
,
Document.ScriptType
public void setFont(Font font)
If the parameter font
is null, nothing will be happened.
font
- font definitionpublic void setFont(Font font, Locale language)
If the parameter font
is null, nothing will be happened.
font
- font definitionpublic void setLanguage(String language, Document.ScriptType type)
If the parameter language
is null, the language information
for this script type will be removed.
language
- - the language informationtype
- - script typepublic void setHorizontalAlignment(StyleTypeDefinitions.HorizontalAlignmentType alignType)
If the parameter alignType
is null, the horizontal alignment
setting will be removed.
alignType
- the horizontal alignmentpublic StyleTypeDefinitions.HorizontalAlignmentType getHorizontalAlignment()
The horizontal alignment in its parent style and default style will be taken into considered.
HorizontalAlignmentType.DEFAULT will be returned if there is no horizontal alignment setting.
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.