All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.webforj.component.html.elements.Paragraph Maven / Gradle / Ivy

package com.webforj.component.html.elements;

import com.webforj.component.Component;
import com.webforj.component.element.annotation.NodeName;
import com.webforj.component.html.HtmlComponentContainer;

/**
 * Component representing a {@code p} element.
 *
 * @see HTML p Tag
 *
 * @author Hyyan Abo Fakher
 * @since 23.06
 */
// We're purposefully ignoring the deep inheritance warning here because we've designed our class
// hierarchy to meet the unique requirements of our UI framework. This design closely aligns with
// our framework's specific goals and emphasizes the need for caution when considering any changes.
//
// Any changes to the inheritance structure should be thoughtfully evaluated in the context of our
// framework's needs. The current structure is essential for meeting those needs.
@SuppressWarnings("squid:S110")
@NodeName("p")
public class Paragraph extends HtmlComponentContainer {

  /**
   * Creates a new empty Paragraph.
   */
  public Paragraph() {
    super();
  }

  /**
   * Creates a new Paragraph with the given text.
   *
   * @param text the text
   */
  public Paragraph(String text) {
    super();
    setText(text);
  }

  /**
   * Creates a new Paragraph with the given child components.
   *
   * @param components the child components
   */
  public Paragraph(Component... components) {
    super(components);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy