Class AbstractWebLayoutComponentDepictor<C extends LayoutComponent>

    • Field Detail

      • ROW_REGION_CLASSES

        protected static final java.lang.String[] ROW_REGION_CLASSES
        The style classes for each region in a row.
      • COLUMN_REGION_CLASSES

        protected static final java.lang.String[] COLUMN_REGION_CLASSES
        The style classes for each region in a column.
    • Constructor Detail

      • AbstractWebLayoutComponentDepictor

        public AbstractWebLayoutComponentDepictor()
        Default constructor with no element representation.
      • AbstractWebLayoutComponentDepictor

        public AbstractWebLayoutComponentDepictor​(java.net.URI namespaceURI,
                                                  java.lang.String localName)
        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.
      • AbstractWebLayoutComponentDepictor

        public AbstractWebLayoutComponentDepictor​(java.net.URI namespaceURI,
                                                  java.lang.String localName,
                                                  boolean isEmptyElementAllowed)
        Element namespace and local name constructor.
        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.
        isEmptyElementAllowed - Whether an empty element can be created if there is no content.
    • Method Detail

      • beginRegion

        protected void beginRegion​(RegionLayout regionLayout,
                                   RegionConstraints regionConstraints,
                                   Orientation orientation)
                            throws java.io.IOException
        Writes an XHTML style attribute for the given region, if style information is needed for that region.

        This version writes alignment and style attributes.

        Parameters:
        regionLayout - The region layout being rendered.
        regionConstraints - The constraints for the region about to be written.
        orientation - The orientation of the component for which the region is being rendered.
        Throws:
        java.io.IOException - if there is an error writing the attribute.
      • beginRegion

        protected void beginRegion​(RegionLayout regionLayout,
                                   RegionConstraints regionConstraints,
                                   Orientation orientation,
                                   boolean includeSize,
                                   boolean includeStyles)
                            throws java.io.IOException
        Writes an XHTML style attribute for the given region, if style information is needed for that region.

        This version writes alignment and style attributes.

        Parameters:
        regionLayout - The region layout being rendered.
        regionConstraints - The constraints for the region about to be written.
        orientation - The orientation of the component for which the region is being rendered.
        includeSize - Whether size information should be included.
        includeStyles - Whether non-size-related style information should be included.
        Throws:
        java.io.IOException - if there is an error writing the attribute.
      • getAlign

        protected java.lang.String getAlign​(double alignment,
                                            Axis axis,
                                            Flow.Direction direction)
        Determines the alignment string for an alignment on a particular axis.

        This implementation converts the alignment to a value by determining into which third the alignment value falls.

        Note that these values also work on the Axis.Y axis for the CSS CSS.CSS_PROP_VERTICAL_ALIGN property.

        Parameters:
        alignment - The alignment value to convert.
        axis - The axis of alignment.
        direction - The direction of flow along the axis.
        Returns:
        The string alignment value, appropriate for a table cell align or valign.
        See Also:
        HTML.TD_ALIGN_LEFT, HTML.TD_ALIGN_CENTER, HTML.TD_ALIGN_RIGHT, HTML.TD_VALIGN_TOP, HTML.TD_VALIGN_MIDDLE, HTML.TD_VALIGN_BOTTOM
      • updateFlowChildView

        protected void updateFlowChildView​(Component childComponent,
                                           Axis axis)
                                    throws java.io.IOException
        Updates a child view in a flow.

        When this method is called, an enclosing element will have been started for the child.

        Parameters:
        childComponent - The child component the view of which is to be updated.
        axis - The axis along which flow is occurring.
        Throws:
        java.io.IOException - if there is an error updating child views.