org.odftoolkit.odfdom.dom.element
public abstract class OdfStyleBase extends OdfContainerElementBase implements OdfStylePropertySet, Comparable
mPackageDocument
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 |
---|
OdfStyleBase(OdfFileDom ownerDocument,
OdfName aName)
Creates a new instance of OdfElement
|
OdfStyleBase(OdfFileDom ownerDocument,
String namespaceURI,
String qualifiedName)
Creates a new instance of OdfElement
|
Modifier and Type | Method and Description |
---|---|
void |
addStyleUser(OdfStylableElement user) |
int |
compareTo(Object obj)
compare one style to another one.
|
boolean |
equals(Object obj)
Indicates if some other object is equal to this one.
|
OdfStyleFamily |
getFamily() |
String |
getFamilyName() |
OdfStylePropertiesBase |
getOrCreatePropertiesElement(OdfStylePropertiesSet set) |
OdfStyleBase |
getParentStyle() |
Map<OdfStyleProperty,String> |
getProperties(Set<OdfStyleProperty> properties)
gets more than one property at once
|
OdfStylePropertiesBase |
getPropertiesElement(OdfStylePropertiesSet set) |
String |
getProperty(OdfStyleProperty prop)
returns the given property from this styleable element or style.
|
Set<OdfStyleProperty> |
getStrictProperties() |
Map<OdfStyleProperty,String> |
getStyleProperties()
get a map containing all properties of this style and their values.
|
Map<OdfStyleProperty,String> |
getStylePropertiesDeep()
get a map containing all properties of this style and their values.
|
int |
getStyleUserCount() |
Iterable<OdfStylableElement> |
getStyleUsers()
Returns an iterator for all
OdfStylableElement elements
using this style. |
int |
hashCode() |
boolean |
hasProperty(OdfStyleProperty prop)
checks if this styleable element or style has this property directly set.
|
protected void |
onOdfNodeInserted(OdfElement node,
Node refChild)
override this method to get notified about element insertion
|
protected void |
onOdfNodeRemoved(OdfElement node)
override this method to get notified about element insertion
|
void |
removeProperty(OdfStyleProperty property)
removes the given property from this set
|
void |
removeStyleUser(OdfStylableElement user) |
void |
setProperties(Map<OdfStyleProperty,String> properties)
set more than one property at once.
|
void |
setProperty(OdfStyleProperty property,
String value)
sets a single style property for this element.
|
insertBefore, removeChild, replaceChild
accept, cloneNode, findFirstChildNode, findNextChildNode, findPreviousChildNode, getAncestorAs, getOdfAttribute, getOdfAttribute, getOdfAttributeValue, getOdfName, getParentAs, hasOdfAttribute, onInsertNode, onInsertNode, onRemoveNode, onRemoveNode, 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, setAttributeNS, 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, 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
public OdfStyleBase(OdfFileDom ownerDocument, String namespaceURI, String qualifiedName) throws DOMException
DOMException
public OdfStyleBase(OdfFileDom ownerDocument, OdfName aName) throws DOMException
DOMException
public void addStyleUser(OdfStylableElement user)
public Map<OdfStyleProperty,String> getStyleProperties()
public Map<OdfStyleProperty,String> getStylePropertiesDeep()
public void removeStyleUser(OdfStylableElement user)
public int getStyleUserCount()
public Iterable<OdfStylableElement> getStyleUsers()
OdfStylableElement
elements
using this style.OdfStylableElement
elements
using this stylepublic String getFamilyName()
public OdfStylePropertiesBase getPropertiesElement(OdfStylePropertiesSet set)
set
- public OdfStylePropertiesBase getOrCreatePropertiesElement(OdfStylePropertiesSet set)
set
- public String getProperty(OdfStyleProperty prop)
OdfStylePropertySet
getProperty
in interface OdfStylePropertySet
prop
- is the property which value will be returned.public boolean hasProperty(OdfStyleProperty prop)
OdfStylePropertySet
hasProperty
in interface OdfStylePropertySet
prop
- is the property to check.protected void onOdfNodeInserted(OdfElement node, Node refChild)
OdfContainerElementBase
onOdfNodeInserted
in class OdfContainerElementBase
protected void onOdfNodeRemoved(OdfElement node)
OdfContainerElementBase
onOdfNodeRemoved
in class OdfContainerElementBase
public Map<OdfStyleProperty,String> getProperties(Set<OdfStyleProperty> properties)
OdfStylePropertySet
getProperties
in interface OdfStylePropertySet
properties
- is a set of all properties that should be returned.public Set<OdfStyleProperty> getStrictProperties()
getStrictProperties
in interface OdfStylePropertySet
public void removeProperty(OdfStyleProperty property)
OdfStylePropertySet
removeProperty
in interface OdfStylePropertySet
property
- is the property to be removedpublic void setProperties(Map<OdfStyleProperty,String> properties)
OdfStylePropertySet
setProperties
in interface OdfStylePropertySet
properties
- is a map of properties with values that should be set.public void setProperty(OdfStyleProperty property, String value)
OdfStylePropertySet
setProperty
in interface OdfStylePropertySet
property
- is the property that you want to set.value
- is the value the property is set to.public int compareTo(Object obj)
compareTo
in interface Comparable
obj
- - the reference object with which to compare2.public boolean equals(Object obj)
equals
in class OdfElement
obj
- - the reference object with which to compare2.public OdfStyleFamily getFamily()
public OdfStyleBase getParentStyle()
Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.