Class CssUtils


  • public final class CssUtils
    extends java.lang.Object
    Utility methods for CSS.
    Author:
    eelcohillenius
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String key​(java.lang.Class<?> scope, java.lang.String facet)
      Get a standardized key for a CSS class.
      static void writeCloseTag​(org.apache.wicket.request.Response response)  
      static void writeCss​(org.apache.wicket.request.Response response, java.lang.CharSequence text, java.lang.String id)
      Write the simple text to the response object surrounded by a style tag.
      static void writeLinkUrl​(org.apache.wicket.request.Response response, java.lang.CharSequence url, java.lang.CharSequence media, java.lang.String markupId)
      Writes a reference to a css file in the response object
      static void writeLinkUrl​(org.apache.wicket.request.Response response, java.lang.CharSequence url, java.lang.CharSequence media, java.lang.String markupId, java.lang.String rel)
      Writes a reference to a css file in the response object
      static void writeOpenTag​(org.apache.wicket.request.Response response, java.lang.String id)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INLINE_OPEN_TAG_START

        public static final java.lang.String INLINE_OPEN_TAG_START
        start of CSS inline open tag
        See Also:
        Constant Field Values
      • INLINE_OPEN_TAG

        public static final java.lang.String INLINE_OPEN_TAG
        CSS inline open tag
        See Also:
        Constant Field Values
      • INLINE_CLOSE_TAG

        public static final java.lang.String INLINE_CLOSE_TAG
        CSS inline close tag
        See Also:
        Constant Field Values
    • Method Detail

      • writeCss

        public static void writeCss​(org.apache.wicket.request.Response response,
                                    java.lang.CharSequence text,
                                    java.lang.String id)
        Write the simple text to the response object surrounded by a style tag.
        Parameters:
        response - The HTTP: response
        text - The text to added in between the style tags
        id - Unique identifier of element
      • writeOpenTag

        public static void writeOpenTag​(org.apache.wicket.request.Response response,
                                        java.lang.String id)
        Parameters:
        response -
        id -
      • writeCloseTag

        public static void writeCloseTag​(org.apache.wicket.request.Response response)
        Parameters:
        response -
      • writeLinkUrl

        public static void writeLinkUrl​(org.apache.wicket.request.Response response,
                                        java.lang.CharSequence url,
                                        java.lang.CharSequence media,
                                        java.lang.String markupId)
        Writes a reference to a css file in the response object
        Parameters:
        response - the response to write to
        url - the url of the css reference
        media - the CSS media
        markupId - the markupId
      • writeLinkUrl

        public static void writeLinkUrl​(org.apache.wicket.request.Response response,
                                        java.lang.CharSequence url,
                                        java.lang.CharSequence media,
                                        java.lang.String markupId,
                                        java.lang.String rel)
        Writes a reference to a css file in the response object
        Parameters:
        response - the response to write to
        url - the url of the css reference
        media - the CSS media
        markupId - the markupId
        rel - the rel attribute
      • key

        public static java.lang.String key​(java.lang.Class<?> scope,
                                           java.lang.String facet)
        Get a standardized key for a CSS class.
        Parameters:
        scope - scope of CSS class
        facet - facet of CSS class
        Returns:
        CSS key