Klasse UiTextComponent<C extends UiTextComponent<C>>

java.lang.Object
org.obrel.core.RelatedObject
Alle implementierten Schnittstellen:
de.esoco.lib.property.TextAttribute, org.obrel.core.Relatable
Bekannte direkte Unterklassen:
UiLabel, UiTitle

public abstract class UiTextComponent<C extends UiTextComponent<C>> extends UiComponent<String,C> implements de.esoco.lib.property.TextAttribute
Base class for read-only text components.
  • Konstruktordetails

    • UiTextComponent

      public UiTextComponent(UiContainer<?> parent, String text)
      Creates a new instance.
      Parameter:
      parent - The parent container
      text - The initial component text
  • Methodendetails

    • getText

      public String getText()
      Returns the element's text.
      Angegeben von:
      getText in Schnittstelle de.esoco.lib.property.TextAttribute
      Gibt zurück:
      The text
    • html

      public C html(String html)
      Sets the text value of this component so that it will be rendered as HTML. The value can be queried with getText().
      Parameter:
      html - The HTML text
      Gibt zurück:
      This instance for fluent invocation
    • resid

      public C resid(String resourceId)
      Sets a resource ID for this instance by setting the UI property ContentProperties.RESOURCE_ID.
      Setzt außer Kraft:
      resid in Klasse UiComponent<String,C extends UiTextComponent<C>>
      Parameter:
      resourceId - The resource ID string
      Gibt zurück:
      This instance for concatenation
    • setFormattedHtml

      public void setFormattedHtml(String template, String... formatArguments)
      Sets an HTML text value, formatted with arguments.
      Siehe auch:
    • setFormattedText

      public void setFormattedText(String template, String... formatArguments)
      Sets a text that will be formatted by inserting values into a template, similar to String.format(String, Object...) but only with strings allowed as format arguments.
      Parameter:
      template - The format template
      formatArguments - The format arguments
    • setHtml

      public void setHtml(String html)
      Sets the text value of this component so that it will be rendered as HTML. The value can be queried with getText().
      Parameter:
      html - The HTML text
    • setText

      public void setText(String text)
      Sets the element's text.
      Angegeben von:
      setText in Schnittstelle de.esoco.lib.property.TextAttribute
      Parameter:
      text - The new text
    • text

      public C text(String text)
      Sets the text of this component.
      Parameter:
      text - The new text
      Gibt zurück:
      This instance for fluent invocation