Class AbstractDecoratedWebComponentDepictor<C extends Component>

    • Constructor Detail

      • AbstractDecoratedWebComponentDepictor

        public AbstractDecoratedWebComponentDepictor()
        Default constructor with no element representation for the body.
      • AbstractDecoratedWebComponentDepictor

        public AbstractDecoratedWebComponentDepictor​(java.net.URI namespaceURI,
                                                     java.lang.String localName)
        Body element namespace and local name constructor that doesn't create an empty element, even if there is no content.
        Parameters:
        namespaceURI - The URI of the XML namespace of the element, or null if there is no namespace.
        localName - The local name of the element with no prefix, or null if this component should not be rendered as an element.
      • AbstractDecoratedWebComponentDepictor

        public AbstractDecoratedWebComponentDepictor​(java.net.URI bodyNamespaceURI,
                                                     java.lang.String bodyLocalName,
                                                     boolean isBodyEmptyElementAllowed)
        Body element namespace and local name constructor.
        Parameters:
        bodyNamespaceURI - The URI of the XML namespace of the body element, or null if there is no namespace.
        bodyLocalName - The local name of the body element with no prefix, or null if this component should not be rendered as an element.
        isBodyEmptyElementAllowed - Whether an empty body element can be created if there is no content.
    • Method Detail

      • getBodyNamespaceURI

        public java.net.URI getBodyNamespaceURI()
        Determines the namespace URI of the body XML element.
        Returns:
        The URI of the XML namespace of the element, or null if there is no namespace.
      • getBodyLocalName

        public java.lang.String getBodyLocalName()
        Determines the local name of the body XML element.
        Returns:
        The local name of the element with no prefix, or null if this component should not be rendered as an element.
      • isEmptyBodyElementAllowed

        public boolean isEmptyBodyElementAllowed()
        Determines whether an empty body element can be created if there is no content.
        Returns:
        Whether an empty body element can be created if there is no content.
        See Also:
        getBodyLocalName()
      • depictBegin

        protected void depictBegin()
                            throws java.io.IOException
        Begins the depiction process.

        This version renders the beginning XML element information, if there is any, leaving the beginning tag open for attributes.

        This version writes common XHTML attributes.

        This version calls writeDecoratorBegin().

        Overrides:
        depictBegin in class AbstractWebComponentDepictor<C extends Component>
        Throws:
        java.io.IOException - if there is an error updating the depiction.
      • writeDecoratorBegin

        protected void writeDecoratorBegin()
                                    throws java.io.IOException
        Writes the beginning part of the outer decorator element. This version writes the beginning decorator items, such as the label, if any.
        Throws:
        java.io.IOException - if there is an error rendering the component.
      • depictEnd

        protected void depictEnd()
                          throws java.io.IOException
        Ends the depiction process.

        This version renders the ending XML element information, if there is any.

        This version calls writeDecoratorEnd().

        Overrides:
        depictEnd in class AbstractWebComponentDepictor<C extends Component>
        Throws:
        java.io.IOException - if there is an error updating the depiction.
      • writeDecoratorEnd

        protected void writeDecoratorEnd()
                                  throws java.io.IOException
        Writes the ending part of the outer decorator element. This version writes the ending decorator items, such as the error message, if any.
        Throws:
        java.io.IOException - if there is an error rendering the component.
        See Also:
        AbstractWebComponentDepictor.writeErrorMessage()