public abstract class OdfStylableElement extends OdfElement implements OdfStylePropertySet
Modifier and Type | Field and Description |
---|---|
protected OdfStyleFamily |
mFamily |
protected OdfName |
mStyleNameAttrib |
localName, namespaceURI
attributes, name
firstChild, fNodeListCache, ownerDocument
nextSibling, previousSibling
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION
Constructor and Description |
---|
OdfStylableElement(OdfFileDom ownerDocument,
OdfName name,
OdfStyleFamily family,
OdfName styleNameAttrib)
Creates a new instance of OdfElementImpl
|
Modifier and Type | Method and Description |
---|---|
OdfStyle |
getAutomaticStyle()
Retrieve ODF AutomaticStyle
|
OdfOfficeAutomaticStyles |
getAutomaticStyles()
Retrieve ODF OfficeAutomaticStyles
|
OdfStyle |
getDocumentStyle()
Retrieve ODF DocumentStyle
|
StyleStyleElement |
getOrCreateUnqiueAutomaticStyle()
Retrieve or create uniqiue ODF AutomaticStyle
|
Map<OdfStyleProperty,String> |
getProperties(Set<OdfStyleProperty> properties)
Retrieve the set of ODF style proerties
|
String |
getProperty(OdfStyleProperty property)
Retrieve ODF style property
|
Set<OdfStyleProperty> |
getStrictProperties()
Retrieve the set of strict ODF properties
|
OdfStyleFamily |
getStyleFamily()
Retrieve ODF style family
|
String |
getStyleName()
Retrieve style name
|
boolean |
hasAutomaticStyle()
Judge if there is an automatic style
|
boolean |
hasDocumentStyle() |
boolean |
hasProperty(OdfStyleProperty property)
Judge if there is an automatic style with this property
|
protected void |
onInsertNode() |
protected void |
onRemoveNode() |
void |
removeProperty(OdfStyleProperty property)
Remove the ODF property
|
OdfStyle |
reuseDocumentStyle(String styleName)
Returns a DocumentStyle if there is no local style
|
void |
setAttributeNS(String uri,
String qname,
String value)
Set style attribute value with uri and name
|
void |
setDocumentStyle(OdfStyle style)
Set ODF DocumentStyle
|
void |
setProperties(Map<OdfStyleProperty,String> properties)
Set ODF properties
|
void |
setProperty(OdfStyleProperty property,
String value)
Set ODF style property with value
|
void |
setStyleName(String name)
Set style name
|
accept, cloneNode, equals, findFirstChildNode, findNextChildNode, findPreviousChildNode, getAncestorAs, getOdfAttribute, getOdfAttribute, getOdfAttributeValue, getOdfName, getParentAs, hasOdfAttribute, insertBefore, onInsertNode, onRemoveNode, removeChild, replaceChild, setOdfAttribute, setOdfAttributeValue, toString
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, isDerivedFrom, setPrefix, setType, setValues
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
getNextSibling, getParentNode, getPreviousSibling
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendChild, compareDocumentPosition, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasChildNodes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, setNodeValue, setTextContent, setUserData
protected OdfStyleFamily mFamily
protected OdfName mStyleNameAttrib
public OdfStylableElement(OdfFileDom ownerDocument, OdfName name, OdfStyleFamily family, OdfName styleNameAttrib) throws DOMException
ownerDocument
- name
- family
- styleNameAttrib
- DOMException
public StyleStyleElement getOrCreateUnqiueAutomaticStyle()
StyleStyleElement
elementpublic OdfOfficeAutomaticStyles getAutomaticStyles()
OdfOfficeAutomaticStyles
element that contains
the automatic style for this element, or null if not available.public void setAttributeNS(String uri, String qname, String value)
setAttributeNS
in interface Element
setAttributeNS
in class ElementImpl
uri
- The namespace uriqname
- The qualified name of the attributevalue
- The attribute valuepublic String getStyleName()
public void setStyleName(String name)
name
- The style namepublic OdfStyle getAutomaticStyle()
OdfStyle
elementpublic boolean hasAutomaticStyle()
public OdfStyle reuseDocumentStyle(String styleName)
OdfStyle
elementpublic void setDocumentStyle(OdfStyle style)
style
- The document stylepublic OdfStyle getDocumentStyle()
public boolean hasDocumentStyle()
public OdfStyleFamily getStyleFamily()
public String getProperty(OdfStyleProperty property)
getProperty
in interface OdfStylePropertySet
property
- The style propertypublic Map<OdfStyleProperty,String> getProperties(Set<OdfStyleProperty> properties)
getProperties
in interface OdfStylePropertySet
properties
- public Set<OdfStyleProperty> getStrictProperties()
getStrictProperties
in interface OdfStylePropertySet
public boolean hasProperty(OdfStyleProperty property)
hasProperty
in interface OdfStylePropertySet
property
- public void removeProperty(OdfStyleProperty property)
removeProperty
in interface OdfStylePropertySet
property
- public void setProperties(Map<OdfStyleProperty,String> properties)
setProperties
in interface OdfStylePropertySet
properties
- public void setProperty(OdfStyleProperty property, String value)
setProperty
in interface OdfStylePropertySet
property
- value
- protected void onInsertNode()
onInsertNode
in class OdfElement
protected void onRemoveNode()
onRemoveNode
in class OdfElement
Copyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.