Example usage for com.badlogic.gdx.scenes.scene2d.ui Cell padRight

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Cell padRight

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui Cell padRight.

Prototype

public Cell<T> padRight(float padRight) 

Source Link

Usage

From source file:com.forerunnergames.peril.client.ui.widgets.Widgets.java

License:Open Source License

public static void padCell(final Cell<?> cell, final float paddingAmount, final CellPadding paddingType) {
    Arguments.checkIsNotNull(cell, "cell");
    Arguments.checkIsNotNegative(paddingAmount, "paddingAmount");
    Arguments.checkIsNotNull(paddingType, "paddingType");

    switch (paddingType) {
    case LEFT: {/*w w  w  . jav  a2s .  c o  m*/
        cell.padLeft(paddingAmount);
        break;
    }
    case RIGHT: {
        cell.padRight(paddingAmount);
        break;
    }
    case TOP: {
        cell.padTop(paddingAmount);
        break;
    }
    case BOTTOM: {
        cell.padBottom(paddingAmount);
        break;
    }
    case ALL: {
        cell.pad(paddingAmount);
    }
    default: {
        throw new IllegalStateException(
                "Unknown " + CellPadding.class.getSimpleName() + " value [" + paddingType + "]");
    }
    }
}