Interface IHCHasCSSStyles<IMPLTYPE extends IHCHasCSSStyles<IMPLTYPE>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      default IMPLTYPE addStyle​(com.helger.css.property.ECSSProperty eProperty, String sPropertyValue)
      Add an element specific style (that is not consistency checked).
      IMPLTYPE addStyle​(com.helger.css.propertyvalue.ICSSValue aValue)
      Add an element specific style.
      default IMPLTYPE addStyles​(com.helger.css.propertyvalue.ICSSValue aValue)
      Deprecated.
      default IMPLTYPE addStyles​(com.helger.css.propertyvalue.ICSSValue... aValues)
      Add element specific styles.
      default IMPLTYPE addStyles​(Iterable<? extends com.helger.css.propertyvalue.ICSSValue> aValues)
      Add element specific styles.
      boolean containsStyle​(com.helger.css.property.ECSSProperty eProperty)
      Check if a style value is associated to a single property.
      com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.css.property.ECSSProperty,​com.helger.css.propertyvalue.ICSSValue> getAllStyles()  
      String getAllStylesAsString​(com.helger.css.ICSSWriterSettings aCSSSettings)
      The value to be set to the HTML style attribute
      com.helger.commons.collection.impl.ICommonsList<com.helger.css.propertyvalue.ICSSValue> getAllStyleValues()  
      com.helger.css.propertyvalue.ICSSValue getStyleValue​(com.helger.css.property.ECSSProperty eProperty)
      Find the style value associated to a single property.
      boolean hasAnyStyle()  
      boolean hasStyle​(com.helger.css.propertyvalue.ICSSValue aValue)
      Check if the style property is contained, and the value matches.
      IMPLTYPE removeAllStyles()
      Remove all styles from the element
      IMPLTYPE removeStyle​(com.helger.css.property.ECSSProperty eProperty)
      Remove the specified style from the element
      • Methods inherited from interface com.helger.commons.traits.IGenericImplTrait

        thisAsT
    • Method Detail

      • addStyle

        @Nonnull
        default IMPLTYPE addStyle​(@Nonnull
                                  com.helger.css.property.ECSSProperty eProperty,
                                  @Nonnull @Nonempty
                                  String sPropertyValue)
        Add an element specific style (that is not consistency checked).
        Parameters:
        eProperty - The CSS property to be added. May not be null.
        sPropertyValue - The property value to be used. May not be null.
        Returns:
        this
      • addStyle

        @Nonnull
        IMPLTYPE addStyle​(@Nullable
                          com.helger.css.propertyvalue.ICSSValue aValue)
        Add an element specific style.
        Parameters:
        aValue - The value to be added. May be null.
        Returns:
        this
      • addStyles

        @Nonnull
        default IMPLTYPE addStyles​(@Nullable
                                   com.helger.css.propertyvalue.ICSSValue... aValues)
        Add element specific styles.
        Parameters:
        aValues - The values to be added. May be null.
        Returns:
        this
      • addStyles

        @Nonnull
        default IMPLTYPE addStyles​(@Nullable
                                   Iterable<? extends com.helger.css.propertyvalue.ICSSValue> aValues)
        Add element specific styles.
        Parameters:
        aValues - The values to be added. May be null.
        Returns:
        this
      • removeStyle

        @Nonnull
        IMPLTYPE removeStyle​(@Nonnull
                             com.helger.css.property.ECSSProperty eProperty)
        Remove the specified style from the element
        Parameters:
        eProperty - The style property to remove
        Returns:
        this
      • removeAllStyles

        @Nonnull
        IMPLTYPE removeAllStyles()
        Remove all styles from the element
        Returns:
        this
      • getAllStyles

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.css.property.ECSSProperty,​com.helger.css.propertyvalue.ICSSValue> getAllStyles()
        Returns:
        A copy of all contained styles. Never null.
      • getAllStyleValues

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<com.helger.css.propertyvalue.ICSSValue> getAllStyleValues()
        Returns:
        All style values. Never null.
      • getStyleValue

        @Nullable
        com.helger.css.propertyvalue.ICSSValue getStyleValue​(@Nullable
                                                             com.helger.css.property.ECSSProperty eProperty)
        Find the style value associated to a single property.
        Parameters:
        eProperty - The property to search. May be null.
        Returns:
        null if no such style is contained.
      • containsStyle

        boolean containsStyle​(@Nullable
                              com.helger.css.property.ECSSProperty eProperty)
        Check if a style value is associated to a single property.
        Parameters:
        eProperty - The property to search. May be null.
        Returns:
        true if a respective style is present, false otherwise.
      • hasStyle

        boolean hasStyle​(@Nullable
                         com.helger.css.propertyvalue.ICSSValue aValue)
        Check if the style property is contained, and the value matches.
        Parameters:
        aValue - The value to be checked
        Returns:
        true if such a CSS value is contained, false otherwise
      • hasAnyStyle

        boolean hasAnyStyle()
        Returns:
        true if at least one CSS style is assigned, false otherwise.
      • getAllStylesAsString

        @Nullable
        String getAllStylesAsString​(@Nonnull
                                    com.helger.css.ICSSWriterSettings aCSSSettings)
        The value to be set to the HTML style attribute
        Parameters:
        aCSSSettings - The CSS settings to use
        Returns:
        null if no styles are present