|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.style.DefaultStyleHandler
public class DefaultStyleHandler
This class is the default style handler. It provides methods to get the readable style element and the writable style element. It also provides method to get all kinds of style properties elements.
Field Summary | |
---|---|
protected boolean |
isUseDefaultStyle
Whether the default style is used. |
protected Document |
mDocument
The document |
protected static HashMap<OdfStyleFamily,EnumSet<OdfStylePropertiesSet>> |
mFamilyProperties
This HashMap contains the relationship between OdfStyleFamily and OdfStylePropertiesSet. |
protected GraphicProperties |
mGraphicProperties
The readable graphics properties element. |
protected OdfStylableElement |
mOdfElement
The odf element |
protected ParagraphProperties |
mParagraphProperties
The readable paragraph properties element. |
protected OdfStyleBase |
mStyleElement
The style element that will be processed. |
protected TableCellProperties |
mTableCellProperties
The readable table cell properties element. |
protected TextProperties |
mTextProperties
The readable text properties element. |
protected GraphicProperties |
mWritableGraphicProperties
The writable graphics properties element. |
protected ParagraphProperties |
mWritableParagraphProperties
The writable paragraph properties element. |
protected OdfStyle |
mWritableStyleElement
The writable style element that will be processed. |
protected TableCellProperties |
mWritableTableCellProperties
The writable table cell properties element. |
protected TextProperties |
mWritableTextProperties
The writable text properties element. |
Constructor Summary | |
---|---|
DefaultStyleHandler(OdfStylableElement element)
Constructor of DefaultStyleHandler |
Method Summary | |
---|---|
GraphicProperties |
getGraphicPropertiesForRead()
Return the graphic style properties definition for this component, only for read function. |
GraphicProperties |
getGraphicPropertiesForWrite()
Return the text style properties definition for this component, for read and write function. |
ParagraphProperties |
getParagraphPropertiesForRead()
Return the paragraph style properties definition for this component, only for read function. |
ParagraphProperties |
getParagraphPropertiesForWrite()
Return the paragraph style properties definition for this component, for read and write function. |
protected OdfStyleBase |
getReadableStyleElementByName(String styleName)
Return a readable style element by style name. |
OdfStyleBase |
getStyleElementForRead()
Return the style element for this component, only for read function. |
OdfStyle |
getStyleElementForWrite()
Return the style element for this component, for read and write functions. |
TableCellProperties |
getTableCellPropertiesForRead()
Return the cell style properties definition for this component, only for read function. |
TableCellProperties |
getTableCellPropertiesForWrite()
Return the cell style properties definition for this component, for read and write function. |
TextProperties |
getTextPropertiesForRead()
Return the text style properties definition for this component, only for read function. |
TextProperties |
getTextPropertiesForWrite()
Return the text style properties definition for this component, for read and write function. |
protected String |
getUsedStyleName()
Return the used style name of this component. |
protected OdfStyle |
getWritableStyleElementByName(String styleName,
boolean isShared)
Return a writable style element by style name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OdfStyleBase mStyleElement
protected OdfStyle mWritableStyleElement
protected boolean isUseDefaultStyle
protected OdfStylableElement mOdfElement
protected Document mDocument
protected TextProperties mTextProperties
protected TextProperties mWritableTextProperties
protected TableCellProperties mTableCellProperties
protected TableCellProperties mWritableTableCellProperties
protected ParagraphProperties mParagraphProperties
protected ParagraphProperties mWritableParagraphProperties
protected GraphicProperties mGraphicProperties
protected GraphicProperties mWritableGraphicProperties
protected static HashMap<OdfStyleFamily,EnumSet<OdfStylePropertiesSet>> mFamilyProperties
Constructor Detail |
---|
public DefaultStyleHandler(OdfStylableElement element)
element
- - the instance of structure component in an ODF documentMethod Detail |
---|
public TextProperties getTextPropertiesForRead()
Null will be returned if there is no style definition.
Null will be returned if there is no explicit text style properties definition for this component.
Note if you try to write style properties to the returned object, errors will be met with.
public TextProperties getTextPropertiesForWrite()
An empty style definition will be created if there is no style definition.
An empty text style properties definition will be created if there is no explicit text style properties definition.
public TableCellProperties getTableCellPropertiesForRead()
Null will be returned if there is no style definition.
Null will be returned if there is no explicit cell style properties definition for this component.
Note if you try to write style properties to the returned object, errors will be met with.
public TableCellProperties getTableCellPropertiesForWrite()
An empty style definition will be created if there is no style definition.
An empty cell style properties definition will be created if there is no explicit cell style properties definition.
public ParagraphProperties getParagraphPropertiesForRead()
Null will be returned if there is no style definition.
Null will be returned if there is no explicit paragraph style properties definition for this component.
Note if you try to write style properties to the returned object, errors will be met with.
public ParagraphProperties getParagraphPropertiesForWrite()
An empty style definition will be created if there is no style definition.
An empty paragraph style properties definition will be created if there is no explicit paragraph style properties definition.
public GraphicProperties getGraphicPropertiesForRead()
Null will be returned if there is no style definition.
Null will be returned if there is no explicit graphic style properties definition for this component.
Note if you try to write style properties to the returned object, errors will be met with.
public GraphicProperties getGraphicPropertiesForWrite()
An empty style definition will be created if there is no style definition.
An empty text style properties definition will be created if there is no explicit text style properties definition.
protected String getUsedStyleName()
This method can be override by sub classes.
Please note the return of this method might not be same with the getStyleName() of component. If the style name is shared by multiple elements, getStyleElementForWrite() will return a copied style element, which is not same with the return of this method.
protected OdfStyleBase getReadableStyleElementByName(String styleName)
If the style name is null, the default style will be returned.
styleName
- - the style name
protected OdfStyle getWritableStyleElementByName(String styleName, boolean isShared)
If the style is shared, a copied style element would be returned.
If the style name is null, the default style will be copied.
styleName
- - the style name
public OdfStyleBase getStyleElementForRead()
getusedStyleName
to get the style name,
and then find the readable style element by name.
Null will be returned if there is no style definition.
Note if you try to write style properties to the returned object, errors will be met with.
getUsedStyleName()
public OdfStyle getStyleElementForWrite()
getusedStyleName
to get
the style name, and then find the writable style element by name.
An empty style definition will be created if there is no style definition.
getUsedStyleName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |