Class OdfStyleableShapeElement

  • All Implemented Interfaces:
    Serializable, Cloneable, OdfStylePropertySet, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo
    Direct Known Subclasses:
    Dr3dCubeElement, Dr3dExtrudeElement, Dr3dRotateElement, Dr3dSceneElement, Dr3dSphereElement, DrawShapeElementBase

    public abstract class OdfStyleableShapeElement
    extends OdfStylableElement
    This class decides upon the shape style attribute, whether the style family is of type 'graphic' or 'presentation'.

    Why do have ODF shapes two alternatives for their style:family attribute?

    In ODF a style (ie. style:style) is always identified not alone by its name, but as well by its style:family. Elements are in general predefined to one style:family. For instance, a paragraph (text:p) will have a style from the style:family="paragraph", a span (text:span) would have a style:family="text".

    Only ODF shapes (e.g. draw:frame) can choose between two different style:family values, ie. 'presentation' and 'graphic'.

    The idea behind is that 'graphic' family shapes have a style that belong to the document similar as all other styles, but 'presentation' family shapes have a style that belongs to a master page.

    The difference: Whenever in an application the master page of a page is being changed, all 'graphic' shapes look the same, only the 'presentation' shapes will get a new look-and-feel from the new master page.

    See Also:
    Serialized Form
    • Constructor Detail

      • OdfStyleableShapeElement

        public OdfStyleableShapeElement​(OdfFileDom ownerDocument,
                                        OdfName name)
    • Method Detail

      • adjustStyleNameAttrib

        protected void adjustStyleNameAttrib​(String uri,
                                             String localname)
        When the style-name prefix is changed between draw: and presentation: the style:family is adjusted as well
        Parameters:
        uri - the namespace uri of the attribute to be changed
        localname - of the attribute to be changed
      • setAttributeNodeNS

        public Attr setAttributeNodeNS​(Attr newAttr)
        Specified by:
        setAttributeNodeNS in interface Element
        Overrides:
        setAttributeNodeNS in class org.apache.xerces.dom.ElementImpl