src/main/java/com/spinyowl/legui/component/misc/listener/label/UpdateLabelWidthListener.java
@Override
  public void process(LabelWidthChangeEvent event) {
    Label label = event.getTargetComponent();
    float textWidth = label.getTextState().getTextWidth();
    label.getSize().x = textWidth;
  }
/**
   * Used to handle {@link LabelContentChangeEvent} event.
   *
   * @param event event to handle.
   */
Used to handle  LabelContentChangeEvent event.
@param event event to handle.
Used to handle LabelContentChangeEvent event . @param event event to handle .
@Override
  public void process(LabelWidthChangeEvent event) {
    Label label = event.getTargetComponent();
    float textWidth = label.getTextState().getTextWidth();
    label.getSize().x = textWidth;
  }
@ Override public void process ( LabelWidthChangeEvent event ) { Label label = event . getTargetComponent ( ) ; float textWidth = label . getTextState ( ) . getTextWidth ( ) ; label . getSize ( ) . x = textWidth ; }
Used to handle {@link LabelContentChangeEvent} event.
Used to handle { @link LabelContentChangeEvent } event .