Interface ElementClassListMethods<E extends Element, B extends TypedBuilder<E,B>>

All Superinterfaces:
IsElement<E>, TypedBuilder<E,B>
All Known Implementing Classes:
HTMLContainerBuilder, HTMLElementBuilder, HTMLInputElementBuilder, HTMLSelectElementBuilder, HTMLTextAreaElementBuilder, Link, MathMLContainerMethods, MathMLElementBuilder, SVGContainerBuilder, SVGElementBuilder

public interface ElementClassListMethods<E extends Element, B extends TypedBuilder<E,B>> extends TypedBuilder<E,B>, IsElement<E>
Provides methods and default implementations for modifying the class list of an element.
  • Method Summary

    Modifier and Type
    Method
    Description
    default ClassList<E>
     
    default B
     
    default B
    css(String... classes)
    Adds the specified CSS classes to the class list of the element.
    default B
    toggle(String className)
    Toggle the class value; i.e., if the class exists, then remove it, if not, then add it.
    default B
    toggle(String className, boolean force)
    Adds (force=true) or removes (force=false) the specified CSS class to the class list of the element.
    default B
    toggle(String className, Supplier<Boolean> force)
    Adds (force=true) or removes (force=false) the specified CSS class to the class list of the element.

    Methods inherited from interface IsElement

    element

    Methods inherited from interface TypedBuilder

    that
  • Method Details

    • css

      default B css(String... classes)
      Adds the specified CSS classes to the class list of the element.
    • toggle

      default B toggle(String className)
      Toggle the class value; i.e., if the class exists, then remove it, if not, then add it.
    • toggle

      default B toggle(String className, boolean force)
      Adds (force=true) or removes (force=false) the specified CSS class to the class list of the element.
    • toggle

      default B toggle(String className, Supplier<Boolean> force)
      Adds (force=true) or removes (force=false) the specified CSS class to the class list of the element.
    • classList

      default B classList(Consumer<ClassList<E>> classList)
    • classList

      default ClassList<E> classList()