Interface IHCHasCSSClasses<IMPLTYPE extends IHCHasCSSClasses<IMPLTYPE>>

    • Method Detail

      • addClasses

        @Nonnull
        default IMPLTYPE addClasses​(@Nullable
                                    ICSSClassProvider... aCSSClassProviders)
        Add multiple unique CSS classes at once. Each CSS class that is already present, is ignored.
        Parameters:
        aCSSClassProviders - The CSS classed to add. May neither be null nor empty.
        Returns:
        this
      • addClasses

        @Nonnull
        default IMPLTYPE addClasses​(@Nullable
                                    Iterable<? extends ICSSClassProvider> aCSSClassProviders)
        Add multiple unique CSS classes at once. Each CSS class that is already present, is ignored.
        Parameters:
        aCSSClassProviders - The CSS classed to add. May neither be null nor empty.
        Returns:
        this
      • removeClass

        @Nonnull
        IMPLTYPE removeClass​(@Nullable
                             ICSSClassProvider aProvider)
        Remove the specified CSS class if present.
        Parameters:
        aProvider - The CSS class provider to use. May be null.
        Returns:
        this
      • removeAllClasses

        @Nonnull
        IMPLTYPE removeAllClasses()
        Remove all previously added CSS classes at once.
        Returns:
        this
      • containsClass

        boolean containsClass​(@Nullable
                              ICSSClassProvider aProvider)
        Check if the passed CSS class is present or not.
        Parameters:
        aProvider - The CSS class provider to check. May be null.
        Returns:
        true if the passed CSS class is contained, false otherwise.
      • getAllClasses

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsOrderedSet<ICSSClassProvider> getAllClasses()
        Returns:
        A sorted set with all registered CSS class providers. Never null.
      • getAllClassNames

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsOrderedSet<String> getAllClassNames()
        Returns:
        A set with all CSS class names registered so far. Never null.
      • hasAnyClass

        boolean hasAnyClass()
        Returns:
        true if at least one CSS class is assigned, false otherwise.
      • getAllClassesAsString

        @Nullable
        String getAllClassesAsString()
        Get the string representation of all contained classes as it should be set to the HTML class attribute. A single blank is used as a separator.
        Returns:
        null if no classes are present.