Example usage for com.badlogic.gdx.scenes.scene2d.utils Disableable setDisabled

List of usage examples for com.badlogic.gdx.scenes.scene2d.utils Disableable setDisabled

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.utils Disableable setDisabled.

Prototype

public void setDisabled(boolean isDisabled);

Source Link

Usage

From source file:com.kotcrab.vis.ui.util.form.SimpleFormValidator.java

License:Apache License

private void updateWidgets() {
    for (Disableable disableable : disableTargets) {
        disableable.setDisabled(formInvalid);
    }/*from   w  ww  .ja v a  2s .  co  m*/

    if (messageLabel != null) {
        if (errorMsgText != null) {
            messageLabel.setText(errorMsgText);
        } else {
            messageLabel.setText(successMsg); //setText will default to "" if successMsg is null
        }

        Color targetColor = errorMsgText != null ? style.errorLabelColor : style.validLabelColor;
        if (targetColor != null && style.colorTransitionDuration != 0) {
            messageLabel.addAction(Actions.color(targetColor, style.colorTransitionDuration));
        } else {
            messageLabel.setColor(targetColor);
        }
    }
}