Interface ILabel

  • All Superinterfaces:
    ICustomGuiComponent

    public interface ILabel
    extends ICustomGuiComponent
    Represents a text label component in a custom GUI. Provides methods to get or set text, size, scale, and shadow properties.
    • Method Detail

      • getText

        java.lang.String getText()
        Returns the text of the label.
        Returns:
        the label text.
      • setText

        ILabel setText​(java.lang.String text)
        Sets the label text.
        Parameters:
        text - the new text.
        Returns:
        this label instance.
      • getWidth

        int getWidth()
        Returns the label's width.
        Returns:
        the width in pixels.
      • getHeight

        int getHeight()
        Returns the label's height.
        Returns:
        the height in pixels.
      • setSize

        ILabel setSize​(int width,
                       int height)
        Sets the size of the label.
        Parameters:
        width - the new width.
        height - the new height.
        Returns:
        this label instance.
      • getScale

        float getScale()
        Returns the scale factor of the label.
        Returns:
        the scale.
      • setScale

        ILabel setScale​(float scale)
        Sets the scale factor of the label.
        Parameters:
        scale - the new scale.
        Returns:
        this label instance.
      • getShadow

        boolean getShadow()
        Returns whether the label text is rendered with a shadow.
        Returns:
        true if shadow is enabled; false otherwise.
      • setShadow

        void setShadow​(boolean shadow)
        Sets whether the label text should be rendered with a shadow.
        Parameters:
        shadow - true to enable shadow.