Class WebCheckControlDepictor<C extends CheckControl>

    • Constructor Detail

      • WebCheckControlDepictor

        public WebCheckControlDepictor()
        Default constructor using the XHTML <span> element.
    • Method Detail

      • getMutualExclusionGroupID

        protected long getMutualExclusionGroupID​(MutualExclusionPolicyModelGroup mutualExclusionModelGroup)
        Determines the ID for the mutual exclusion group. If no ID has been assigned to the given group, one will be generated and associated with the group.
        Parameters:
        mutualExclusionModelGroup - The model policy group for mutual exclusion for which its ID should be given.
        Returns:
        The component identifier for the mutual exclusion group.
      • isMutualExclusion

        protected static boolean isMutualExclusion​(CheckControl checkControl)
        Determines whether the check control is a mutual exclusion control and should be considered a radio button rather than a checkbox.
        Parameters:
        checkControl - The component which should be determined to be mutual exclusion or not.
        Returns:
        true if the given component has a MutualExclusionPolicyModelGroup value listener.
        See Also:
        MutualExclusionPolicyModelGroup
      • getCheckControlName

        protected java.lang.String getCheckControlName​(CheckControl checkControl)
        Determines the identifier to place in the name attribute of the component's XHTML element. For XHTML radio buttons, a unique identifier for its mutual exclusion policy model group is returned; the component ID is returned if this is not a mutual exclusion component.
        Parameters:
        checkControl - The component for which a name should be retrieved.
        Returns:
        An identifier appropriate for the name attribute of the component's XHTML element, or null if the component's element should not have a name.
        See Also:
        MutualExclusionPolicyModelGroup
      • getOuterStyles

        protected java.util.Map<java.lang.String,​java.lang.Object> getOuterStyles()
        Retrieves the styles for the outer element of the component.

        This version returns the style for color.

        This version combines the body styles with the outer styles.

        Overrides:
        getOuterStyles in class AbstractWebComponentDepictor<C extends CheckControl>
        Returns:
        The styles for the outer element of the component, mapped to CSS property names.
      • getDepictName

        public java.lang.String getDepictName()
        Determines the identifier to place in the name attribute of the component's XHTML element. For XHTML radio buttons, a unique identifier for its mutual exclusion policy model group is returned; the component ID is returned if this is not a mutual exclusion component.
        Specified by:
        getDepictName in interface WebComponentDepictor<C extends CheckControl>
        Overrides:
        getDepictName in class AbstractWebComponentDepictor<C extends CheckControl>
        Returns:
        An identifier appropriate for the name attribute of the component's XHTML element, or null if the component's element should not have a name.
        See Also:
        getCheckControlName(CheckControl)
      • getInputType

        protected java.lang.String getInputType()
        Determines the XHTML input type to use for getting input from the user.
        Returns:
        One of the XHTML input types.
      • depictBegin

        protected void depictBegin()
                            throws java.io.IOException
        Description copied from class: AbstractWebComponentDepictor
        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.

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

        protected void depictEnd()
                          throws java.io.IOException
        Description copied from class: AbstractWebComponentDepictor
        Ends the depiction process.

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

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